-
Notifications
You must be signed in to change notification settings - Fork 148
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
Table function for supporting prometheus query_range function #875
Table function for supporting prometheus query_range function #875
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 2.x #875 +/- ##
============================================
- Coverage 97.90% 95.18% -2.72%
- Complexity 3072 3126 +54
============================================
Files 293 309 +16
Lines 7588 8392 +804
Branches 490 618 +128
============================================
+ Hits 7429 7988 +559
- Misses 158 350 +192
- Partials 1 54 +53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
c3bb272
to
283973f
Compare
913dbde
to
d95305d
Compare
d95305d
to
ac8499a
Compare
core/src/main/java/org/opensearch/sql/planner/logical/LogicalTableFunction.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/ast/expression/Function.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/analysis/ExpressionAnalyzer.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/expression/function/PrometheusFunctions.java
Outdated
Show resolved
Hide resolved
ac8499a
to
4f51649
Compare
core/src/main/java/org/opensearch/sql/expression/function/PrometheusFunctions.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/expression/function/PrometheusFunctions.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/opensearch/sql/expression/function/PrometheusFunctions.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/opensearch/sql/planner/logical/LogicalTableFunctionTest.java
Outdated
Show resolved
Hide resolved
9d05fca
to
f3b82e7
Compare
Similar to first iteration except that functions are exposed via storageengine. Will try to incorporate. |
be9e53d
to
ebda4b1
Compare
core/src/main/java/org/opensearch/sql/expression/function/BuiltinFunctionRepository.java
Show resolved
Hide resolved
ebda4b1
to
f5db21e
Compare
Signed-off-by: vamsi-amazon <reddyvam@amazon.com>
f5db21e
to
3526376
Compare
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.
please update the docs.
I will raise one this week for catalogs and all. |
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.
Thanks for the changes!
Description
query_range
table function is defined to support pass through promQL query directly to prometheus.These functions can be called either with named parameters or positioned parameters.
Example queries for query_range.
Named parameters query.
source = prometheus.query_range(query="promQL", start=123, end=145, step=45)
Positioned parameters query.
source = prometheus.query_range("promQL", 123, 145, 45)
Issues Related:
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.