Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[PPL] Support expression in syntax #524

Merged
merged 3 commits into from Jun 22, 2020

Conversation

chloe-zh
Copy link
Member

Issue #, if available:

Description of changes:

Support nested valueExpression in syntax and parser
In our grammar file, the related nested expressions are structured as follows:

└─ expression
   |— logicalExpression
   |— comparisonExpression
      |— compareExpr ( := left=valueExpression comparisonOperator right=valueExpression )
      └─ inExpr ( := valueExpression IN valueList )
   └─ valueExpression
      |— binaryArithmetic ( := left=valueExpression binaryOperator right=valueExpression )
      └─ primaryExpression
         |— evalFunctionCall ( := evalFunctionName '(' valueExpression... ')' )
         |— fieldExpression
         └─ literalValue

└─ statsFunction ( := statsFunctionName '(' valueExpression ')' )

(Note: Left recursion can be avoid by tagging the context with custom name)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@chloe-zh chloe-zh added the PPL label Jun 17, 2020
@chloe-zh chloe-zh changed the title [PPL] Supported expression in syntax [PPL] Support expression in syntax Jun 17, 2020
@chloe-zh chloe-zh linked an issue Jun 17, 2020 that may be closed by this pull request
Copy link
Member

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

Copy link
Contributor

@penghuo penghuo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change.

@chloe-zh chloe-zh merged commit 88a9c5d into opendistro-for-elasticsearch:develop Jun 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PPL] aggregation doesn't support expression as arguments
3 participants