Source:
protected final OperatorFactory createHashProjectOperator(int operatorId, PlanNodeId planNodeId, List<Type> types) { ImmutableMap.Builder<Symbol, Type> symbolTypes = ImmutableMap.builder(); ImmutableList.Builder<VariableReferenceExpression> variables = ImmutableList.builder(); ImmutableMap.Builder<VariableReferenceExpression, Integer> variableToInputMapping = ImmutableMap.builder(); ImmutableList.Builder<PageProjection> projections = ImmutableList.builder(); for (int channel = 0; channel < types.size(); channel++) { VariableReferenceExpression variable = new VariableReferenceExpression("h" + channel, types.get(channel)); symbolTypes.put(new Symbol(variable.getName()), types.get(channel)); variables.add(variable); variableToInputMapping.put(variable, channel); projections.add(new InputPageProjection(channel, types.get(channel))); } Optional<RowExpression> hashExpression = HashGenerationOptimizer.getHashExpression(localQueryRunner.getMetadata().getFunctionManager(), variables.build()); verify(hashExpression.isPresent()); RowExpression translated = VariableToChannelTranslator.translate(hashExpression.get(), variableToInputMapping.build()); PageFunctionCompiler functionCompiler = new PageFunctionCompiler(localQueryRunner.getMetadata(), 0); projections.add(functionCompiler.compileProjection(translated, Optional.empty()).get()); return new FilterAndProjectOperator.FilterAndProjectOperatorFactory( operatorId, planNodeId, () -> new PageProcessor(Optional.empty(), projections.build()), ImmutableList.copyOf(Iterables.concat(types, ImmutableList.of(BIGINT))), getFilterAndProjectMinOutputPageSize(session), getFilterAndProjectMinOutputPageRowCount(session)); }

Target:
protected final OperatorFactory createHashProjectOperator(int operatorId, PlanNodeId planNodeId, List<Type> types) { ImmutableMap.Builder<Symbol, Type> symbolTypes = ImmutableMap.builder(); ImmutableList.Builder<VariableReferenceExpression> variables = ImmutableList.builder(); ImmutableMap.Builder<VariableReferenceExpression, Integer> variableToInputMapping = ImmutableMap.builder(); ImmutableList.Builder<PageProjection> projections = ImmutableList.builder(); for (int channel = 0; channel < types.size(); channel++) { VariableReferenceExpression variable = new VariableReferenceExpression("h" + channel, types.get(channel)); symbolTypes.put(new Symbol(variable.getName()), types.get(channel)); variables.add(variable); variableToInputMapping.put(variable, channel); projections.add(new InputPageProjection(channel, types.get(channel))); } Optional<RowExpression> hashExpression = HashGenerationOptimizer.getHashExpression(localQueryRunner.getMetadata().getFunctionManager(), variables.build()); verify(hashExpression.isPresent()); RowExpression translatedHashExpression = translate(hashExpression.get(), variableToInputMapping.build()); PageFunctionCompiler functionCompiler = new PageFunctionCompiler(localQueryRunner.getMetadata(), 0); projections.add(functionCompiler.compileProjection(translatedHashExpression, Optional.empty()).get()); return new FilterAndProjectOperator.FilterAndProjectOperatorFactory( operatorId, planNodeId, () -> new PageProcessor(Optional.empty(), projections.build()), ImmutableList.copyOf(Iterables.concat(types, ImmutableList.of(BIGINT))), getFilterAndProjectMinOutputPageSize(session), getFilterAndProjectMinOutputPageRowCount(session)); }