@Override public ILogicalOperator visitSelectOperator(SelectOperator op, Void arg) throws AlgebricksException { return new SelectOperator(deepCopyExpressionRef(op.getCondition()), op.getRetainMissing(), op.getMissingPlaceholderVariable()); }
@Override public Pair<ILogicalOperator, LogicalVariable> visit(HavingClause havingClause, Mutable<ILogicalOperator> tupSource) throws CompilationException { Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(havingClause.getFilterExpression(), tupSource); SelectOperator s = new SelectOperator(new MutableObject<>(p.first), false, null); s.getInputs().add(p.second); return new Pair<>(s, null); }
private static void copySelectToBranch(SelectOperator select, Mutable<ILogicalOperator> branch, IOptimizationContext context) throws AlgebricksException { ILogicalOperator newSelect = new SelectOperator(select.getCondition(), select.getRetainMissing(), select.getMissingPlaceholderVariable()); Mutable<ILogicalOperator> newRef = new MutableObject<ILogicalOperator>(branch.getValue()); newSelect.getInputs().add(newRef); branch.setValue(newSelect); context.computeAndSetTypeEnvironmentForOperator(newSelect); }
@Override public Pair<ILogicalOperator, LogicalVariable> visit(WhereClause w, Mutable<ILogicalOperator> tupSource) throws CompilationException { Pair<ILogicalExpression, Mutable<ILogicalOperator>> p = langExprToAlgExpression(w.getWhereExpr(), tupSource); SelectOperator s = new SelectOperator(new MutableObject<>(p.first), false, null); s.getInputs().add(p.second); s.setSourceLocation(w.getSourceLocation()); return new Pair<>(s, null); }
@Override public ILogicalOperator visitSelectOperator(SelectOperator op, ILogicalOperator arg) throws AlgebricksException { SelectOperator opCopy = new SelectOperator(exprDeepCopyVisitor.deepCopyExpressionReference(op.getCondition()), op.getRetainMissing(), deepCopyVariable(op.getMissingPlaceholderVariable())); deepCopyInputsAnnotationsAndExecutionMode(op, arg, opCopy); return opCopy; }
SelectOperator select = new SelectOperator(new MutableObject<ILogicalExpression>(pulledCond), false, null); ILogicalExpression newJoinCond = makeCondition(eqVarVarComps, context); join.getCondition().setValue(newJoinCond);
firstExpr = e; } else { SelectOperator newSelect = new SelectOperator(new MutableObject<ILogicalExpression>(e), select.getRetainMissing(), select.getMissingPlaceholderVariable()); newSelect.setSourceLocation(sourceLoc);
new SelectOperator(new MutableObject<ILogicalExpression>(isFilterableExpr), false, null); isFilterableSelectOp.setSourceLocation(sourceLoc); isFilterableSelectOp.getInputs().add(new MutableObject<ILogicalOperator>(inputOp)); isNotFilterableExpr.setSourceLocation(sourceLoc); SelectOperator isNotFilterableSelectOp = new SelectOperator(new MutableObject<ILogicalExpression>(isNotFilterableExpr), false, null); isNotFilterableSelectOp.setSourceLocation(sourceLoc); isNotFilterableSelectOp.getInputs().add(new MutableObject<ILogicalOperator>(inputOp));
FunctionUtil.getFunctionInfo(BuiltinFunctions.NOT), argsForNotFunction); notExpr.setSourceLocation(sourceLoc); SelectOperator selectOp = new SelectOperator(new MutableObject<>(notExpr), false, null); selectOp.setSourceLocation(sourceLoc); currentOpRef.getValue().getInputs().add(new MutableObject<>(selectOp));
selectExprRef = nullCheckExprRefs.get(0); SelectOperator selectOp = new SelectOperator(selectExprRef, false, null); selectOp.setSourceLocation(sourceLoc); topJoinRef.setValue(selectOp);
switch (joinOp.getJoinKind()) { case INNER: { extraSelect = new SelectOperator(exprRef, false, null); extraSelect.setSourceLocation(exprRef.getValue().getSourceLocation()); extraSelect.getInputs().add(new MutableObject<>(outputOp));
SelectOperator s; if (qe.getQuantifier() == Quantifier.SOME) { s = new SelectOperator(new MutableObject<>(eo2.first), false, null); s.getInputs().add(eo2.second); s.setSourceLocation(sourceLoc); FunctionUtil.getFunctionInfo(AlgebricksBuiltinFunctions.NOT), notArgs); notExpr.setSourceLocation(sourceLoc); s = new SelectOperator(new MutableObject<>(notExpr), false, null); s.getInputs().add(eo2.second); s.setSourceLocation(sourceLoc);
new ScalarFunctionCallExpression(finfoNot, new MutableObject<>(isSystemNullTest)); nonSystemNullTest.setSourceLocation(sourceLoc); selectNonSystemNull = new SelectOperator(new MutableObject<>(nonSystemNullTest), false, null); selectNonSystemNull.setSourceLocation(sourceLoc); } else { selectNonSystemNull = new SelectOperator( new MutableObject<>(new ScalarFunctionCallExpression(finfoAnd, isSystemNullTestList)), false, null); selectNonSystemNull.setSourceLocation(sourceLoc);
NestedTupleSourceOperator ntsOp = new NestedTupleSourceOperator(new MutableObject<>(subplanOp)); ntsOp.setSourceLocation(sourceLoc); SelectOperator select = new SelectOperator(selectExpr, false, null);
satExpr = sfce(BuiltinFunctions.FN_NOT_1, satExpr); SelectOperator select = new SelectOperator(mutable(satExpr), false, null); select.getInputs().add(mutable(tCtx.op)); tCtx.op = select;
SelectOperator topSelect = new SelectOperator(new MutableObject<ILogicalExpression>(joinCond), isLeftOuterJoin, newNullPlaceHolderVar); topSelect.setSourceLocation(indexPlanRootOp.getSourceLocation());
SelectOperator topSelectOp = new SelectOperator(conditionRef, isLeftOuterJoin, newNullPlaceHolderVar); topSelectOp.setSourceLocation(finalIndexSearchOp.getSourceLocation()); topSelectOp.getInputs().add(indexSubTree.getRootRef());
ILogicalExpression condExpr = sfce(BuiltinFunctions.FN_BOOLEAN_1, vre(translateExpression(wcNode.getCondition(), tCtx))); SelectOperator select = new SelectOperator(mutable(condExpr), false, null); select.getInputs().add(mutable(tCtx.op)); tCtx.op = select;
SelectOperator select = new SelectOperator(mutable(selectCondition), false, null); select.getInputs().add(mutable(tCtx.op)); tCtx.op = select;
SelectOperator filter = new SelectOperator(new MutableObject<>(conditionExprOpPair.first), false, null); filter.getInputs().add(conditionExprOpPair.second); filter.setSourceLocation(conditionExprOpPair.first.getSourceLocation()); SelectOperator filter = new SelectOperator(new MutableObject<>(conditionExprOpPair.first), false, null); filter.getInputs().add(conditionExprOpPair.second); filter.setSourceLocation(conditionExprOpPair.first.getSourceLocation());