mihaibudiu opened a new pull request, #5409:
URL: https://github.com/apache/calcite/pull/5409

   ## Jira Link
   
   [CALCITE-7933](https://issues.apache.org/jira/browse/CALCITE-7933)
   
   ## Changes Proposed
   
   This commit contains multiple small changes and fixes related to lambdas:
   
   SqlToRelConverter:
   - Allow a lambda in a sub-query to read a column of the enclosing query.
   - A lambda in an aggregate gave wrong results or an out-of-bounds error; now 
it should work correctly.
   
   CorrelateProjectExtractor:
   - does not move an expression that reads a parameter out of the lambda.
   
   EnumUtils:
   - In the generated Java code the parameters of the generated code are final. 
Before, Janino rejected the generated code.
   
   Validator:
   - Reject lambda which have subquries in the body. This is in line with all 
major SQL dialects which support lambdas.
   - Reject lambdas which invoke an aggregate function, GROUPING, or a windowed 
aggregate.
   - Reject a lambda in the ORDER BY clause which attempts to read columns 
(this used to crash; support can be added later if desired)
   - SqlLambdaScope.isParameter checks the first name of a compound identifier, 
such as r.f0. Before, it failed with an AssertionError.
   


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