-
Notifications
You must be signed in to change notification settings - Fork 8
feat : Addition of API support for receiving attribute expressions #126
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #126 +/- ##
============================================
+ Coverage 81.12% 81.29% +0.17%
- Complexity 567 575 +8
============================================
Files 53 53
Lines 2193 2235 +42
Branches 235 236 +1
============================================
+ Hits 1779 1817 +38
- Misses 320 323 +3
- Partials 94 95 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
query-service-impl/src/main/java/org/hypertrace/core/query/service/QueryRequestUtil.java
Outdated
Show resolved
Hide resolved
query-service-impl/src/main/java/org/hypertrace/core/query/service/ExecutionContext.java
Outdated
Show resolved
Hide resolved
// workaround is to use alias for now | ||
builder.setColumnName(function.getFunctionName()); | ||
} | ||
builder.setColumnName(getAlias(expression)); | ||
builder.setValueType(ValueType.STRING); |
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.
Is value type always string and never repeated? Looks pre-existing, but pretty sure this is a bug. Can come back to it.
...ice-impl/src/main/java/org/hypertrace/core/query/service/pinot/PinotBasedRequestHandler.java
Outdated
Show resolved
Hide resolved
@@ -245,7 +248,7 @@ private boolean rhsHasLongValue(Expression rhs) { | |||
// return it. | |||
if (filter.getChildFilterCount() == 0) { | |||
return doesSingleViewFilterMatchLeafQueryFilter(viewFilterMap, filter) | |||
? Set.of(filter.getLhs().getColumnIdentifier().getColumnName()) | |||
? Set.of(getLogicalColumnName(filter.getLhs())) |
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.
This would break if I created a filter of "10 = duration" - it's assuming any col will be on the LHS. Can defer and file this since it's pre-existing and widespread in this code.
...ice-impl/src/main/java/org/hypertrace/core/query/service/pinot/PinotBasedRequestHandler.java
Outdated
Show resolved
Hide resolved
...mpl/src/main/java/org/hypertrace/core/query/service/projection/ProjectionTransformation.java
Show resolved
Hide resolved
...mpl/src/main/java/org/hypertrace/core/query/service/projection/ProjectionTransformation.java
Show resolved
Hide resolved
query-service-impl/src/main/java/org/hypertrace/core/query/service/ExecutionContext.java
Outdated
Show resolved
Hide resolved
...ice-impl/src/main/java/org/hypertrace/core/query/service/pinot/PinotBasedRequestHandler.java
Outdated
Show resolved
Hide resolved
...l/src/main/java/org/hypertrace/core/query/service/pinot/QueryRequestToPinotSQLConverter.java
Show resolved
Hide resolved
...main/java/org/hypertrace/core/query/service/prometheus/QueryRequestEligibilityValidator.java
Outdated
Show resolved
Hide resolved
...ice-impl/src/main/java/org/hypertrace/core/query/service/pinot/PinotBasedRequestHandler.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
@sarthak77 Can you add the integration test as discussed in the morning? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
System.out.println(json); | ||
|
||
// Change for attribute Expression | ||
json = json.replaceAll("columnIdentifier", "attributeExpression"); |
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.
We don't have any existing columnIdentifier queries with map field with CONTAINS_KEY_VALUE, right? If, so, it will fail the transformation.
Ref issue: #99
Files changed :
Testing