kadirozde opened a new pull request, #2428: URL: https://github.com/apache/phoenix/pull/2428
Introduces a v2 WHERE optimizer in compile/keyspace/ that models each expression as a list of per-PK-column KeyRange tuples (KeySpace), with AND as per-dim intersection and OR governed by containment + equal-on-N-1 merge rules. Key-range conversion is deferred until trailing dims are dropped against a cartesian bound, making the algorithm O(N^2) in PK arity. RVC inequalities and IN lists are lowered to lexicographic OR-of-AND form in a single ExpressionNormalizer pass so per-dim intersection composes uniformly with every other predicate. Feature flag phoenix.where.optimizer.v2.enabled routes WhereOptimizer .pushKeyExpressionsToScan to the v2 driver; default is now true. The legacy implementation is untouched and remains the fallback when the flag is disabled. All 138 WhereOptimizerTest methods pass under both flag values; 37 byte-shape divergences are captured in isV2Optimizer() branches with verbose comments explaining why v2 differs from v1 (DESC encoding, RVC clip, tautology simplification, trim-trailing, scalar-function composition limits, filter shape). 37 new keyspace- level unit tests cover the algebra, normalization, visitor, and extractor in isolation. -- 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]
