-
Notifications
You must be signed in to change notification settings - Fork 2k
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 query changes to support unsigned-long in star tree #17275
base: main
Are you sure you want to change the base?
Add query changes to support unsigned-long in star tree #17275
Conversation
Signed-off-by: Shailesh Singh <shaikumm@amazon.com>
1545244
to
5c9fee9
Compare
❌ Gradle check result for 5c9fee9: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
server/src/main/java/org/opensearch/search/startree/filter/provider/DimensionFilterMapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/startree/filter/provider/DimensionFilterMapper.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/startree/filter/ExactMatchDimFilter.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/opensearch/index/compositeindex/datacube/startree/node/StarTreeNode.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/index/compositeindex/datacube/DimensionDataType.java
Show resolved
Hide resolved
server/src/test/java/org/opensearch/search/aggregations/startree/MetricAggregatorTests.java
Show resolved
Hide resolved
server/src/main/java/org/opensearch/search/startree/filter/provider/DimensionFilterMapper.java
Show resolved
Hide resolved
Signed-off-by: Shailesh Singh <shaikumm@amazon.com>
826d5e3
to
128f2dd
Compare
❌ Gradle check result for 128f2dd: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
resultStarTreeNode = binarySearchChild( | ||
dimensionValue, | ||
lastMatchedChild, | ||
dimensionFilterMapper == null ? DimensionDataType.LONG::compare : dimensionFilterMapper.comparator() |
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.
I understand this had to be done because we are yet to clean up
default StarTreeNode getChildForDimensionValue(Long dimensionValue) throws IOException {
which is only used in Unit tests for ST Indexing.
Let's pass DimensionDataType.LONG::compare
from StarTreeNode for the time being to avoid putting the logic of figuring out the right comparator here ( since it's independent of the format of star tree index )
@@ -109,26 +110,30 @@ public interface StarTreeNode { | |||
* @throws IOException if an I/O error occurs while retrieving the child node | |||
*/ | |||
default StarTreeNode getChildForDimensionValue(Long dimensionValue) throws IOException { |
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 add a TODO to remove this method.
Only used in UTs for Star Tree indexing.
@@ -109,26 +110,30 @@ public interface StarTreeNode { | |||
* @throws IOException if an I/O error occurs while retrieving the child node | |||
*/ | |||
default StarTreeNode getChildForDimensionValue(Long dimensionValue) throws IOException { | |||
return getChildForDimensionValue(dimensionValue, null); | |||
return getChildForDimensionValue(dimensionValue, null, null); |
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.
Lets pass DimensionDataType.LONG::compare
here for the time being.
Once, we remove this method it would all go away together.
Thanks for the work on this PR and your patience in addressing comments. @Shailesh-Kumar-Singh Just left a minor comment, rest looks good to me. |
Description
Parent issue - [Star tree] Handle 'unsigned long' as part of star tree #15231
Handle unsigned long in search operations in star tree.
Related Issues
[Star tree] Handle 'unsigned long' as part of star tree #15231
[Star Tree ] Handle unsigned long during flush and merge operations #16645
This PR along with Indexing PR together resolves #15231
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.