-
Notifications
You must be signed in to change notification settings - Fork 246
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 FieldExpansionIterator that replaces the ANYFIELD scanner #2660
base: integration
Are you sure you want to change the base?
Conversation
warehouse/query-core/src/main/java/datawave/query/data/parsers/ShardIndexKey.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/jexl/lookups/FieldExpansionIndexLookup.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/core/iterators/FieldExpansionIterator.java
Show resolved
Hide resolved
if (date.compareTo(startDate) < 0) { | ||
// advance to start date | ||
log.trace("Key before start date: {} < {}", date, startDate); | ||
return new FilterResult(false, AdvanceResult.NEXT); |
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 there a NEXT_CQ ?
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.
Instead of NEXT_CQ maybe this should be a custom hint that triggers a seek to the start date..
warehouse/query-core/src/main/java/datawave/query/data/parsers/ShardIndexKey.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/data/parsers/ShardIndexKey.java
Show resolved
Hide resolved
public FieldExpansionIndexLookup(ShardQueryConfiguration config, ScannerFactory scannerFactory, String term, Set<String> fields, | ||
ExecutorService execService) { | ||
super(config, scannerFactory, true, execService); | ||
this.term = term.toLowerCase(); |
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.
why lower case here? normalizers do not necessarily lower case values.
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.
Right you are...I need to revisit this case. The previous implementation was doing a just-in-time expansion for normalization which implies the ExpandMultiNormalizedTerms doesn't handle unfielded terms well..
} | ||
|
||
if (datatypes != null && !datatypes.contains(parser.getDatatype())) { | ||
// figure out if we are before the first datatype -- seek to first datatype |
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 comment does not seem relevant here
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.
can we seek to the next datatype?
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.
Due to the structure of the shard index keys a seek based on the datatype is never practical. I'll correct the comment.
Add iterator that expands fields for literal values.