File tree Expand file tree Collapse file tree
java/org/opensearch/sql/ppl/parser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -385,13 +385,6 @@ JSON_DELETE: 'JSON_DELETE';
385385JSON_APPEND : ' JSON_APPEND' ;
386386JSON_EXTEND : ' JSON_EXTEND' ;
387387
388- // LAMBDA FUNCTIONS
389- // EXISTS: 'EXISTS';
390- FORALL : ' FORALL' ;
391- FILTER : ' FILTER' ;
392- TRANSFORM : ' TRANSFORM' ;
393- REDUCE : ' REDUCE' ;
394-
395388// FLOWCONTROL FUNCTIONS
396389IFNULL : ' IFNULL' ;
397390NULLIF : ' NULLIF' ;
Original file line number Diff line number Diff line change @@ -462,8 +462,6 @@ valueExpression
462462 | timestampFunction # timestampFunctionCall
463463 | LT_PRTHS valueExpression RT_PRTHS # parentheticValueExpr
464464 | LT_SQR_PRTHS subSearch RT_SQR_PRTHS # scalarSubqueryExpr
465- | ident ARROW expression # lambda
466- | LT_PRTHS ident (COMMA ident)+ RT_PRTHS ARROW expression # lambda
467465 ;
468466
469467primaryExpression
@@ -583,15 +581,14 @@ evalFunctionName
583581 | jsonFunctionName
584582 | geoipFunctionName
585583 | collectionFunctionName
586- | lambdaFunctionName
587584 ;
588585
589586functionArgs
590587 : (functionArg (COMMA functionArg)*)?
591588 ;
592589
593590functionArg
594- : (ident EQUAL )? valueExpression
591+ : (ident EQUAL )? expression
595592 ;
596593
597594relevanceArg
@@ -720,14 +717,6 @@ jsonFunctionName
720717 | JSON_EXTEND
721718 ;
722719
723- lambdaFunctionName
724- : FORALL
725- | EXISTS
726- | FILTER
727- | TRANSFORM
728- | REDUCE
729- ;
730-
731720cryptographicFunctionName
732721 : MD5
733722 | SHA1
Original file line number Diff line number Diff line change @@ -562,7 +562,7 @@ public UnresolvedPlan visitTableFunction(TableFunctionContext ctx) {
562562 String argName = (arg .ident () != null ) ? arg .ident ().getText () : null ;
563563 builder .add (
564564 new UnresolvedArgument (
565- argName , this .internalVisitExpression (arg .valueExpression ())));
565+ argName , this .internalVisitExpression (arg .expression ())));
566566 });
567567 return new TableFunction (this .internalVisitExpression (ctx .qualifiedName ()), builder .build ());
568568 }
Original file line number Diff line number Diff line change @@ -133,17 +133,6 @@ public UnresolvedExpression visitLogicalXor(LogicalXorContext ctx) {
133133 return new Xor (visit (ctx .left ), visit (ctx .right ));
134134 }
135135
136- @ Override
137- public UnresolvedExpression visitLambda (OpenSearchPPLParser .LambdaContext ctx ) {
138-
139- List <QualifiedName > arguments =
140- ctx .ident ().stream ()
141- .map (x -> this .visitIdentifiers (Collections .singletonList (x )))
142- .collect (Collectors .toList ());
143- UnresolvedExpression function = visitExpression (ctx .expression ());
144- return new LambdaFunction (function , arguments );
145- }
146-
147136 /** Comparison expression. */
148137 @ Override
149138 public UnresolvedExpression visitCompareExpr (CompareExprContext ctx ) {
You can’t perform that action at this time.
0 commit comments