private void copySourceLocation(ILogicalExpression src, AbstractLogicalExpression dest) { dest.setSourceLocation(src.getSourceLocation()); }
partFields.forEach(f -> { AbstractLogicalExpression sampledField = new VariableReferenceExpression(f.getColumn()); sampledField.setSourceLocation(sourceLocation); sampledFields.add(new MutableObject<>(sampledField)); }); samplingResultVarExp.setSourceLocation(sourceLocation); arg.add(new MutableObject<>(samplingResultVarExp));
private static ForwardOperator createForward(String rangeMapKey, LogicalVariable rangeMapVariable, MutableObject<ILogicalOperator> exchangeOpFromReplicate, MutableObject<ILogicalOperator> globalAggInput, IOptimizationContext context, SourceLocation sourceLocation) throws AlgebricksException { AbstractLogicalExpression rangeMapExpression = new VariableReferenceExpression(rangeMapVariable); rangeMapExpression.setSourceLocation(sourceLocation); ForwardOperator forwardOperator = new ForwardOperator(rangeMapKey, new MutableObject<>(rangeMapExpression)); forwardOperator.setSourceLocation(sourceLocation); forwardOperator.setPhysicalOperator(new ForwardPOperator()); forwardOperator.getInputs().add(exchangeOpFromReplicate); forwardOperator.getInputs().add(globalAggInput); OperatorManipulationUtil.setOperatorMode(forwardOperator); forwardOperator.recomputeSchema(); context.computeAndSetTypeEnvironmentForOperator(forwardOperator); return forwardOperator; }
Pair<ILogicalOperator, LogicalVariable> frameOffsetResult = winFrameOffsetExpr.accept(this, currentOpRef); frameOffsetExpr = new VariableReferenceExpression(frameOffsetResult.second); frameOffsetExpr.setSourceLocation(sourceLoc); currentOpRef = new MutableObject<>(frameOffsetResult.first); } else if (makeRunningAgg) { resultExpr = new VariableReferenceExpression(runningAggResultVar); resultExpr.setSourceLocation(sourceLoc); } else if (makeNestedAgg) { resultExpr = new VariableReferenceExpression(nestedAggResultVar); resultExpr.setSourceLocation(sourceLoc); } else { throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, sourceLoc, "");