Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/integration' into integration
Browse files Browse the repository at this point in the history
  • Loading branch information
jwomeara committed Feb 8, 2024
2 parents fa7e503 + a95abde commit 45623c7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,7 @@ protected Future<IteratorSetting> loadQueryIterator(final MetadataHelper metadat

addOption(cfg, QueryOptions.SORTED_UIDS, Boolean.toString(config.isSortedUIDs()), false);

configureTypeMappings(config, cfg, metadataHelper, getCompressOptionMappings());
configureTypeMappings(config, cfg, metadataHelper, getCompressOptionMappings(), isPreload);
configureAdditionalOptions(config, cfg);

loadFields(cfg, config, isPreload);
Expand Down Expand Up @@ -2273,6 +2273,11 @@ protected IteratorSetting getQueryIterator(MetadataHelper metadataHelper, ShardQ

public static void configureTypeMappings(ShardQueryConfiguration config, IteratorSetting cfg, MetadataHelper metadataHelper, boolean compressMappings)
throws DatawaveQueryException {
configureTypeMappings(config, cfg, metadataHelper, compressMappings, false);
}

public static void configureTypeMappings(ShardQueryConfiguration config, IteratorSetting cfg, MetadataHelper metadataHelper, boolean compressMappings,
boolean isPreload) throws DatawaveQueryException {
try {
addOption(cfg, QueryOptions.QUERY_MAPPING_COMPRESS, Boolean.toString(compressMappings), false);

Expand All @@ -2286,7 +2291,7 @@ public static void configureTypeMappings(ShardQueryConfiguration config, Iterato

TypeMetadata typeMetadata = metadataHelper.getTypeMetadata(config.getDatatypeFilter());

if (config.getReduceTypeMetadata()) {
if (config.getReduceTypeMetadata() && !isPreload) {
Set<String> fieldsToRetain = ReduceFields.getQueryFields(config.getQueryTree());
typeMetadata = typeMetadata.reduce(fieldsToRetain);
}
Expand Down

0 comments on commit 45623c7

Please sign in to comment.