Skip to content
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

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Conversation

GumpacG
Copy link

@GumpacG GumpacG commented Feb 8, 2023

Description

Added IT and parser tests for nested function calls in the select clause.

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

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

@GumpacG GumpacG requested a review from a team February 8, 2023 23:12
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Merging #222 (6ef8169) into dev-spike-nested-aggregation (cb7508d) will not change coverage.
The diff coverage is 0.00%.

@@                       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           
Flag Coverage Δ
sql-engine 96.26% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ain/java/org/opensearch/sql/analysis/Analyzer.java 98.74% <ø> (ø)
...rg/opensearch/sql/analysis/ExpressionAnalyzer.java 100.00% <ø> (ø)
...h/sql/expression/function/BuiltinFunctionName.java 100.00% <ø> (ø)
...pensearch/sql/planner/physical/UnnestOperator.java 0.00% <ø> (ø)
.../opensearch/sql/storage/read/TableScanBuilder.java 90.00% <ø> (ø)
...l/opensearch/request/OpenSearchRequestBuilder.java 61.20% <ø> (ø)
...ch/sql/opensearch/response/OpenSearchResponse.java 44.70% <ø> (ø)
...java/org/opensearch/sql/sql/parser/AstBuilder.java 92.95% <ø> (ø)
.../opensearch/sql/sql/parser/AstUnnestedBuilder.java 50.00% <0.00%> (ø)

📣 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)*

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.

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.

Copy link
Author

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.

Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: forestmvey <[email protected]>
Signed-off-by: Guian Gumpac <[email protected]>
@GumpacG GumpacG changed the base branch from dev-spike-nested-aggregation to dev-nested-cleanup February 15, 2023 19:13
@GumpacG GumpacG merged commit 4205b9c into dev-nested-cleanup Feb 15, 2023
forestmvey pushed a commit that referenced this pull request Feb 16, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Feb 16, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Feb 24, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Mar 7, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Mar 21, 2023
* 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]>
GumpacG added a commit that referenced this pull request Mar 21, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Mar 22, 2023
* 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]>
forestmvey pushed a commit that referenced this pull request Mar 28, 2023
* 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]>
andy-k-improving pushed a commit that referenced this pull request Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants