-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add pinot function registry to translate functions #21
Conversation
Codecov Report
@@ Coverage Diff @@
## main #21 +/- ##
============================================
+ Coverage 73.83% 74.89% +1.05%
- Complexity 261 283 +22
============================================
Files 27 29 +2
Lines 1093 1151 +58
Branches 141 140 -1
============================================
+ Hits 807 862 +55
- Misses 230 233 +3
Partials 56 56
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
0461bfd
to
8970f86
Compare
8970f86
to
1c04e62
Compare
query-service-impl/src/main/java/org/hypertrace/core/query/service/QueryFunctionConstants.java
Outdated
Show resolved
Hide resolved
query-service-impl/src/main/java/org/hypertrace/core/query/service/QueryFunctionConstants.java
Outdated
Show resolved
Hide resolved
query-service-impl/src/main/java/org/hypertrace/core/query/service/QueryFunctionConstants.java
Outdated
Show resolved
Hide resolved
import org.hypertrace.core.query.service.api.Value; | ||
import org.hypertrace.core.query.service.api.ValueType; | ||
|
||
public class PinotFunctionConverter { |
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.
Nice.. Thanks for cleaning this up!
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.
No problem. Once this is up and running, we can do some clean up on the gateway side to strip the conversion there since this handles it now.
Change Motivation: Query service is an abstraction over one or more data stores, but currently the abstract query requires implementation-specific function names. This function converter relaxes that constraint, and converts abstract functions (which, as of this change, are mostly the same as pinot-specific functions, with the exception of percentile and count) into functions compatible with pinot. This will allow us to remove some pinot-bound logic in gateway service (which previously did this conversion - we include logic here to unwind that for backwards compatibility), as well as add an upcoming feature, attribute projection, in such a way that the projection logic is not coupled to a specific data store. |
Change Motivation: Query service is an abstraction over one or more data stores, but currently the abstract query requires implementation-specific function names. This function converter relaxes that constraint, and converts abstract functions (which, as of this change, are mostly the same as pinot-specific functions, with the exception of percentile and count) into functions compatible with pinot. This will allow us to remove some pinot-bound logic in gateway service (which previously did this conversion - we include logic here to unwind that for backwards compatibility), as well as add an upcoming feature, attribute projection, in such a way that the projection logic is not coupled to a specific data store.