-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests for nested in select clause #222
Conversation
Codecov Report
@@ Coverage Diff @@
## dev-spike-nested-aggregation #222 +/- ##
===============================================================
Coverage 96.26% 96.26%
Complexity 3644 3644
===============================================================
Files 348 348
Lines 9227 9227
Branches 605 605
===============================================================
Hits 8882 8882
Misses 334 334
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -317,7 +317,7 @@ nestedFunction | |||
; | |||
|
|||
nestedField | |||
: ID DOT ID (DOT ID)* | |||
: ident DOT ident (DOT ident)* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you adding some fixes or only tests?
BTW one of ident
options is DOT? ID
. This parser rule accepts field..subfield
I suspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, maybe we should add a nestedIdent
rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be part of this PR because it is related to one of the tests not parsing for fields with opensearch function names. For example, dayOfWeek
.
sql/src/main/java/org/opensearch/sql/sql/parser/AstBuilder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]>
96fd14f
to
f287cb2
Compare
Signed-off-by: Guian Gumpac <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
* Added tests Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> * Added a nestedIdent in the parser Signed-off-by: Guian Gumpac <[email protected]> --------- Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]> Signed-off-by: Guian Gumpac <[email protected]> Signed-off-by: forestmvey <[email protected]>
Signed-off-by: dblock <[email protected]>
Description
Added IT and parser tests for nested function calls in the select clause.
SELECT UPPER(NESTED(message.info)) FROM nested_objects
. This should be added once the expected results are determined in [DISCUSSION] Properly support array values in new engine opensearch-project/sql#1300.Note
Workflows are failing due to POC base branch. Fixing these will be part of a different PR.
Failing workflows are expected at this stage.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.