Check for IndexSourceNode domain handle symbols
Verify on IndexSourceNode construction that handles in the tuple domain
have assigned symbols.  This was being preserved by PruneOutputColumns,
and this check makes that preservation official.
@@ -67,6 +67,11 @@ public class IndexSourceNode
checkArgument(!outputSymbols.isEmpty(), "outputSymbols is empty");
checkArgument(assignments.keySet().containsAll(lookupSymbols), "Assignments do not include all lookup symbols");
checkArgument(outputSymbols.containsAll(lookupSymbols), "Lookup symbols need to be part of the output symbols");
+ Set<ColumnHandle> assignedColumnHandles = ImmutableSet.copyOf(assignments.values());
+ effectiveTupleDomain.getDomains().ifPresent(handleToDomain ->
+ checkArgument(
+ assignedColumnHandles.containsAll(handleToDomain.keySet()),
+ "Tuple domain handles must have assigned symbols"));
}
@JsonProperty
