Refactor enforceLayoutProcessor
Throw a message with a more specific text about what channel is missing.
This helps a lot when debugging an optimizer change.
@@ -2419,6 +2419,7 @@ public class LocalExecutionPlanner
private static Function<Page, Page> enforceLayoutProcessor(List<Symbol> expectedLayout, Map<Symbol, Integer> inputLayout)
{
int[] channels = expectedLayout.stream()
+ .peek(symbol -> checkArgument(inputLayout.containsKey(symbol), "channel not found for symbol: %s", symbol))
.mapToInt(inputLayout::get)
.toArray();
