[ https://issues.apache.org/jira/browse/CALCITE-3679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17101070#comment-17101070 ]
Julian Hyde commented on CALCITE-3679: -------------------------------------- First impression is that the PR is rather scruffy. Comments have been copy-pasted without being changed. Lines of whitespace have been added and removed. Some classes have no javadoc. Justify why we need a new class of RexSlot. This case has no real description, so there's no indication of the intended scope. Do we intend to parse, validate, execute? Lambdas in functional programming languages are functions-as-values. They are typed, they allow closures (carrying their environment for later evaluation) and they can be used anywhere that any other value is used. They are beautiful and very powerful. So a half-hearted implementation would make me very sad. The SQL implementations I have seen (Presto and SparkSQL) have a few built-in higher-order functions (i.e. functions that take lambdas as arguments and/or return lambdas as results) but do not allow user-defined higher-order functions. This makes me sad. A minimal level of functionality for Calcite would include support for lambdas as standalone values (e.g. 'select empno, x -> x + 1 from emp') and adequate typing of lambdas (not 'LAMBDA' but 'FUNCTION<INTEGER, INTEGER>' or similar). > Allow lambda expressions in SQL queries > --------------------------------------- > > Key: CALCITE-3679 > URL: https://issues.apache.org/jira/browse/CALCITE-3679 > Project: Calcite > Issue Type: New Feature > Reporter: Ritesh > Assignee: Ritesh > Priority: Major > Labels: pull-request-available > Attachments: [CALCITE-3679]_Basic_implementation.patch > > Time Spent: 5h 40m > Remaining Estimate: 0h > > [https://teradata.github.io/presto/docs/0.167-t/functions/lambda.html] -- This message was sent by Atlassian Jira (v8.3.4#803005)