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

Enable Table Function and PromQL function #1719

Merged

Conversation

vamsi-amazon
Copy link
Member

@vamsi-amazon vamsi-amazon commented Jun 7, 2023

Description

Enable Table function and promQL function. This also enables to build spark sql function.

Issues Resolved

#1019

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.

@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

Merging #1719 (65fdc83) into main (bd9b180) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #1719      +/-   ##
============================================
+ Coverage     97.30%   97.33%   +0.03%     
- Complexity     4326     4405      +79     
============================================
  Files           385      388       +3     
  Lines         10807    10935     +128     
  Branches        762      771       +9     
============================================
+ Hits          10516    10644     +128     
  Misses          284      284              
  Partials          7        7              
Flag Coverage Δ
sql-engine 97.33% <100.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
...pensearch/sql/ppl/parser/AstExpressionBuilder.java 100.00% <ø> (ø)
...ch/sql/prometheus/response/PrometheusResponse.java 100.00% <ø> (ø)
...java/org/opensearch/sql/ppl/parser/AstBuilder.java 100.00% <100.00%> (ø)
...ensearch/sql/ppl/utils/PPLQueryDataAnonymizer.java 100.00% <100.00%> (ø)
...ponse/DefaultQueryRangeFunctionResponseHandle.java 100.00% <100.00%> (ø)
...tions/scan/QueryRangeFunctionTableScanBuilder.java 100.00% <100.00%> (ø)
...ions/scan/QueryRangeFunctionTableScanOperator.java 100.00% <100.00%> (ø)
.../sql/prometheus/storage/PrometheusMetricTable.java 100.00% <100.00%> (ø)

... and 6 files with indirect coverage changes

rupal-bq
rupal-bq previously approved these changes Jun 8, 2023
@dai-chen
Copy link
Collaborator

dai-chen commented Jun 8, 2023

I forgot why we disabled this in PPL earlier?

@vamsi-amazon
Copy link
Member Author

I forgot why we disabled this in PPL earlier?

@dai-chen There was no UX on dashboards for table functions during 2.4 release. With spark sql we are building UX to handle table functions.

Yury-Fridlyand
Yury-Fridlyand previously approved these changes Jun 9, 2023
-> {
String argName = (arg.ident() != null) ? arg.ident().getText() : null;
builder.add(
new UnresolvedArgument(argName,
Copy link
Collaborator

Choose a reason for hiding this comment

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

When argName could be null? Are you protected from NPE when it is used?

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
penghuo
penghuo previously approved these changes Jun 9, 2023
@vamsi-amazon vamsi-amazon force-pushed the enable-table-function branch 3 times, most recently from 585adba to fa3f6d9 Compare June 15, 2023 01:46
Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
Copy link
Collaborator

@anirudha anirudha left a comment

Choose a reason for hiding this comment

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

Awesome! @penghuo to signoff

@vamsi-amazon vamsi-amazon merged commit af7bccb into opensearch-project:main Jun 15, 2023
13 of 15 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 15, 2023
* Enable PromQL function

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

* Enable table function

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>

---------

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
(cherry picked from commit af7bccb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Metrics] Bring back support for query_range table function support for prometheus connector.
7 participants