-
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
Feature/create summaries #2649
base: integration
Are you sure you want to change the base?
Feature/create summaries #2649
Conversation
239efc1
to
16bfd93
Compare
warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/planner/DefaultQueryPlanner.java
Outdated
Show resolved
Hide resolved
0315e6e
to
de635db
Compare
9137fb9
to
6186bcc
Compare
working summaries created fix test reccomendations trailing regex for name matching remove unused import parameters can be entered in any order
Re-generated AccumuloSyntaxParser.java from AccumuloSyntaxParser.jj using a verson of javacc 4.1 build from https://github.com/javacc/javacc/tree/release_41
6186bcc
to
2c92f1c
Compare
warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/attributes/SummarySize.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/language/functions/jexl/SummarySize.java
Outdated
Show resolved
Hide resolved
public String getSummaryIterator() { | ||
return getConfig().getSummaryIterator().getName(); | ||
} | ||
|
||
public void setSummaryIterator(String iteratorClass) { | ||
try { | ||
getConfig().setSummaryIterator((Class<? extends SortedKeyValueIterator<Key,Value>>) Class.forName(iteratorClass)); | ||
} catch (Exception e) { | ||
throw new DatawaveFatalQueryException("Illegal d column summary iterator class", e); | ||
} | ||
} |
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 is actually the iterator class name. Follow the pattern used by the create uids iterator, i.e., use getCreateUidsIteratorClass
and setCreateUidsIteratorClass
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 think it is like this so that the specified class can be easily changed (could be wrong about that though). See set/get ExcerptIterator
warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java
Outdated
Show resolved
Hide resolved
|
||
String queryString = "QUOTE:(farther) #SUMMARY(SIZE:-50)"; | ||
|
||
// not sure why the timestamp and delete flag are present |
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.
did we figure out why the timestamp and delete flag are present?
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.
The timestamp and delete flag will always be present as components of the key if we're using toString()
, won't they?
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.
idk tbh. the layout of this test was taken from "ExcerptTest" and it had the same thing.
warehouse/query-core/src/main/java/datawave/query/transformer/SummaryTransform.java
Outdated
Show resolved
Hide resolved
2c92f1c
to
2eac9ae
Compare
warehouse/query-core/src/main/java/datawave/query/attributes/SummaryOptions.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java
Outdated
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/iterator/logic/DColumnSummaryIterator.java
Outdated
Show resolved
Hide resolved
...house/query-core/src/test/java/datawave/query/iterator/logic/DColumnSummaryIteratorTest.java
Outdated
Show resolved
Hide resolved
|
||
String queryString = "QUOTE:(farther) #SUMMARY(SIZE:-50)"; | ||
|
||
// not sure why the timestamp and delete flag are present |
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.
The timestamp and delete flag will always be present as components of the key if we're using toString()
, won't they?
Looks like the builds might be failing due to a formatting issue - consider double checking this. |
} | ||
} catch (Exception e) { | ||
log.warn("Unable to parse summary size string, returning empty SummaryOptions: {}", string, e); | ||
return new SummaryOptions(); |
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.
maybe this should be a fatal rather that default situation?
warehouse/query-core/src/main/java/datawave/query/iterator/logic/ContentSummaryIterator.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/iterator/logic/ContentSummaryIterator.java
Show resolved
Hide resolved
warehouse/query-core/src/main/java/datawave/query/iterator/logic/ContentSummaryIterator.java
Show resolved
Hide resolved
foundContent.put(currentViewName, source.getTopValue().get()); | ||
} | ||
} else { | ||
if (currentViewName.equalsIgnoreCase(name)) { | ||
foundContent.put(currentViewName, source.getTopValue().get()); |
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.
should there be a limit on the amount of content that will be added to prevent potential memory problems? This might also require some more configuration flags
this.setSummaryOptions(summaryOptions); | ||
config.setSummaryOptions(summaryOptions); |
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.
should the config be updated in the call to setSummaryOptions()?
adds new functionality to create summaries for returned documents