Check if mask symbol is provided
@@ -120,6 +120,9 @@ public final class ValidateDependenciesChecker
for (Aggregation aggregation : node.getAggregations().values()) {
Set<Symbol> dependencies = SymbolsExtractor.extractUnique(aggregation.getCall());
checkDependencies(inputs, dependencies, "Invalid node. Aggregation dependencies (%s) not in source plan output (%s)", dependencies, node.getSource().getOutputSymbols());
+ aggregation.getMask().ifPresent(mask -> {
+ checkDependencies(inputs, ImmutableSet.of(mask), "Invalid node. Aggregation mask symbol (%s) not in source plan output (%s)", mask, node.getSource().getOutputSymbols());
+ });
}
return null;
