apurtell opened a new pull request, #2666: URL: https://github.com/apache/phoenix/pull/2666
During uncovered global index scans, post-scan filtering evaluates unindexed predicate conditions against merged data rows directly on the server. `RegionScannerFactory` evaluates predicates across merged rows without resetting the underlying expression tree between row iterations, causing these queries to omit matching rows whenever an earlier record encounters NULL values. Under the hood, composite logical operators inherit a persistent `seenNull` flag via `AndOrExpression`. When a row encounters a NULL evaluation within any branch of a conjunction, this flag remains latched for subsequent evaluations. When a later row satisfies all conditions, the lingering flag forces the compound AND expression to evaluate to NULL rather than TRUE. The scanner treats this as a failed match and discards the record, dropping all remaining qualifying rows within that region scan or salt bucket. Conjunctions are uniquely susceptible to this leakage. Disjunctions naturally short-circuit upon encountering a TRUE condition before the corrupted flag can alter the outcome. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
