org.apache.phoenix.exception.PhoenixSQLException: Table MYSCHEMA.MYTABLE does not exist – metadata lookup failure
19K reputation · 27 Jan 2021, 15:02 UTC
The goal is to clarify how Apache Phoenix secondary indexes treat rows where the indexed column contains NULL. Specifically, we need to determine whether such rows are omitted from the index structure or are stored with a special sentinel value that allows the index to be used for queries filtering on NULL. The official documentation does not specify this behavior, and anecdotal reports suggest a change between Phoenix 4.x and 5.x, leaving administrators uncertain about index coverage for NULL‑valued columns.
This uncertainty affects query planning because a covered index scan may return different results than a full table scan when the query includes IS NULL predicates. Without a clear definition, it is difficult to predict whether an index‑only scan will be valid or whether a fallback to the base table is required. To resolve this, we need answers to the following: Does Phoenix include NULL values in secondary indexes? If so, what sentinel or encoding is used to represent NULL? Does the handling differ between Phoenix 4.x and 5.x releases?