diff --git a/pom.xml b/pom.xml index 807b2ac..43a9ffa 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ ../../../microservices/microservice-parent/pom.xml metadata-utils - 4.0.4-SNAPSHOT + 4.0.6-SNAPSHOT https://code.nsa.gov/datawave-metadata-utils diff --git a/src/main/java/datawave/query/util/AllFieldMetadataHelper.java b/src/main/java/datawave/query/util/AllFieldMetadataHelper.java index af91ef7..ff47676 100644 --- a/src/main/java/datawave/query/util/AllFieldMetadataHelper.java +++ b/src/main/java/datawave/query/util/AllFieldMetadataHelper.java @@ -33,6 +33,7 @@ import org.apache.accumulo.core.data.Value; import org.apache.accumulo.core.iterators.user.RegExFilter; import org.apache.accumulo.core.security.Authorizations; +import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.tuple.Pair; import org.apache.hadoop.io.Text; import org.apache.hadoop.io.WritableUtils; @@ -1270,9 +1271,9 @@ public Map> getReversedFieldIndexHoles(Set> getFieldIndexHoles(Text targetCol indexedFields.addAll(indexedFieldMap.get(datatype)); } } + + // if the initial fields list is empty, then we want all possible holes if (fields.isEmpty()) { fields = indexedFields; } else { fields.retainAll(indexedFields); + + // if we have removed all fields, then there are no fields for which we can generate holes + if (fields.isEmpty()) { + return new HashMap<>(); + } } // Ensure the minThreshold is a percentage in the range 0%-100%. @@ -1378,6 +1386,11 @@ public boolean getBoundaryValue() { public long getCount() { return this.count; } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } } /**