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 Support for Nested Function in Order By Clause #280

Merged
merged 3 commits into from
Jun 27, 2023

Conversation

forestmvey
Copy link

Description

Add support for nested function use in the ORDER BY clause.

Example Queries

SELECT nested(message.info) from nested_objects ORDER BY nested(message.info);

Issues Resolved

Portion of Issue: 1111

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.

@forestmvey forestmvey requested a review from a team June 22, 2023 18:32
@forestmvey forestmvey changed the title Dev nested order by Add Support for Nested Function in Order By Clause Jun 22, 2023
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #280 (72043d4) into integ-nested-order-by (6c3744e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@                   Coverage Diff                    @@
##             integ-nested-order-by     #280   +/-   ##
========================================================
  Coverage                    97.29%   97.29%           
- Complexity                    4408     4415    +7     
========================================================
  Files                          388      388           
  Lines                        10944    10960   +16     
  Branches                       774      777    +3     
========================================================
+ Hits                         10648    10664   +16     
  Misses                         289      289           
  Partials                         7        7           
Flag Coverage Δ
sql-engine 97.29% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
.../org/opensearch/sql/sql/parser/AstSortBuilder.java 100.00% <ø> (ø)
...va/org/opensearch/sql/analysis/NestedAnalyzer.java 100.00% <100.00%> (ø)
...earch/storage/scan/OpenSearchIndexScanBuilder.java 100.00% <100.00%> (ø)
...arch/storage/script/filter/lucene/LuceneQuery.java 100.00% <100.00%> (ø)
...ensearch/storage/script/sort/SortQueryBuilder.java 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@forestmvey forestmvey merged commit 554b55f into integ-nested-order-by Jun 27, 2023
@forestmvey forestmvey deleted the dev-nested-order-by branch June 27, 2023 15:29
forestmvey added a commit that referenced this pull request Jun 27, 2023
* Adding order by clause support for nested function.

Signed-off-by: forestmvey <[email protected]>

* Adding test coverage for nested in ORDER BY clause.

Signed-off-by: forestmvey <[email protected]>

* Added nested function validation to NestedAnalyzer.

Signed-off-by: forestmvey <[email protected]>

---------

Signed-off-by: forestmvey <[email protected]>
acarbonetto pushed a commit that referenced this pull request Jun 27, 2023
…t#1789)

* Add Support for Nested Function in Order By Clause (#280)

* Adding order by clause support for nested function.

Signed-off-by: forestmvey <[email protected]>

* Adding test coverage for nested in ORDER BY clause.

Signed-off-by: forestmvey <[email protected]>

* Added nested function validation to NestedAnalyzer.

Signed-off-by: forestmvey <[email protected]>

---------

Signed-off-by: forestmvey <[email protected]>

* Adding semantic check for missing arguments in function and unit test.

Signed-off-by: forestmvey <[email protected]>

---------

Signed-off-by: forestmvey <[email protected]>
MaxKsyunz pushed a commit that referenced this pull request Jul 7, 2023
…t#1789) (opensearch-project#1794)

* Add Support for Nested Function in Order By Clause (#280)

* Adding order by clause support for nested function.

Signed-off-by: forestmvey <[email protected]>

* Adding test coverage for nested in ORDER BY clause.

Signed-off-by: forestmvey <[email protected]>

* Added nested function validation to NestedAnalyzer.

Signed-off-by: forestmvey <[email protected]>

---------

Signed-off-by: forestmvey <[email protected]>

* Adding semantic check for missing arguments in function and unit test.

Signed-off-by: forestmvey <[email protected]>

---------

Signed-off-by: forestmvey <[email protected]>
(cherry picked from commit 3302ec8)

Co-authored-by: Forest Vey <[email protected]>
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.

5 participants