-
Notifications
You must be signed in to change notification settings - Fork 236
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 option to sort query by field cardinality #2425
base: integration
Are you sure you want to change the base?
Conversation
… from the DatawaveMetadata table
9dac86c
to
0066649
Compare
@@ -2796,6 +2797,20 @@ public Tuple2<CloseableIterable<QueryPlan>,Boolean> getQueryRanges(ScannerFactor | |||
return new Tuple2<>(ranges, needsFullTable); | |||
} | |||
|
|||
protected ASTJexlScript timedSortQueryBeforeGlobalIndex(ShardQueryConfiguration config, MetadataHelper metadataHelper) throws DatawaveQueryException { | |||
return visitorManager.timedVisit(config.getTimers(), "SortQueryBeforeGlobalIndex", () -> { |
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 am missing if there is a test that covers this change. Is there a way to test that it did what we want? Maybe testing the final plan to see that is is different when isSortQueryBeforeGlobalIndex is set to true?
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.
Added a test to verify the query terms are re-ordered by field cardinality and discovered another problem with the RebuildingScannerHelper which led to it's removal from a test.
…e test framework to not use rebuilding scanner helper due to incompatible usages of interfaces
Update the sortQueryBeforeGlobalIndex option to get field cardinality from the DatawaveMetadata table
FOO.min() == 1
Note: until metadata-utils #37 is merged and the 4.0.2 tag created, this build will fail.