apurtell opened a new pull request, #2664:
URL: https://github.com/apache/phoenix/pull/2664

   Implementation of universal (ALL) and existential (ANY) array comparisons 
have a common inheritance differing only in concrete node type. Because AST 
cloning relies on visitor traversal, the inherited traversal hook caused 
`CloneExpressionVisitor` to dispatch to the base visitor method, mistakenly 
reconstructing cloned ALL expressions as ANY comparisons.
   
   This surfaces whenever the query engine duplicates expressions, such as for 
server side array, JSON, and BSON projection rewrites; and for projecting via 
`RowProjector` to isolate per-invocation, non-deterministic functions (such as 
`RAND()`) across execution threads
   
   Conditions like `= ALL(...)` or `< ALL(...)` silently collapsed into 
existential (ANY) semantics during query compilation and execution.
   
   Examples:
   
   `SELECT ARR1[1] = ALL(ARR2) FROM T`
   
   `UPSERT INTO T2 SELECT ID, FLOOR(RAND() * 3) < ALL(ARR) FROM T1`
   
   The fix is for the cloning visitor to preserve the distinction between the 
subtypes.


-- 
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]

Reply via email to