@Override public Void visitDataScanOperator(DataSourceScanOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { List<LogicalVariable> variables = op.getVariables(); for (int i = 0; i < variables.size(); i++) { if (variables.get(i) == pair.first) { variables.set(i, pair.second); return null; } } if (op.getSelectCondition() != null) { op.getSelectCondition().getValue().substituteVar(pair.first, pair.second); } substVarTypes(op, pair); return null; }
@Override public ILogicalOperator visitDataScanOperator(DataSourceScanOperator op, Void arg) throws AlgebricksException { ArrayList<LogicalVariable> newInputList = new ArrayList<>(); newInputList.addAll(op.getVariables()); Mutable<ILogicalExpression> newSelectCondition = op.getSelectCondition() != null ? deepCopyExpressionRef(op.getSelectCondition()) : null; DataSourceScanOperator newOp = new DataSourceScanOperator(newInputList, op.getDataSource(), newSelectCondition, op.getOutputLimit()); return newOp; }
@Override public Void visitDataScanOperator(DataSourceScanOperator op, Void arg) { if (op.getAdditionalFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); } } if (op.getSelectCondition() != null) { Set<LogicalVariable> usedVariablesBySelect = new HashSet<>(); op.getSelectCondition().getValue().getUsedVariables(usedVariablesBySelect); usedVariablesBySelect.removeAll(op.getVariables()); usedVariables.addAll(usedVariablesBySelect); } return null; }
@Override public String visitDataScanOperator(DataSourceScanOperator op, Boolean showDetails) throws AlgebricksException { stringBuilder.setLength(0); stringBuilder.append("data-scan ").append(op.getProjectVariables()).append("<-").append(op.getVariables()) .append(" <- ").append(op.getDataSource()); appendFilterInformation(op.getMinFilterVars(), op.getMaxFilterVars()); appendSelectConditionInformation(op.getSelectCondition()); appendLimitInformation(op.getOutputLimit()); appendSchema(op, showDetails); appendAnnotations(op, showDetails); appendPhysicalOperatorInfo(op, showDetails); return stringBuilder.toString(); }
@Override public ILogicalOperator visitDataScanOperator(DataSourceScanOperator op, ILogicalOperator arg) throws AlgebricksException { Mutable<ILogicalExpression> newSelectCondition = op.getSelectCondition() != null ? exprDeepCopyVisitor.deepCopyExpressionReference(op.getSelectCondition()) : null; DataSourceScanOperator opCopy = new DataSourceScanOperator(deepCopyVariableList(op.getVariables()), op.getDataSource(), newSelectCondition, op.getOutputLimit()); deepCopyInputsAnnotationsAndExecutionMode(op, arg, opCopy); return opCopy; }
@Override public Void visitDataScanOperator(DataSourceScanOperator op, Integer indent) throws AlgebricksException { AlgebricksAppendable plan = addIndent(indent).append( "data-scan " + op.getProjectVariables() + "<-" + op.getVariables() + " <- " + op.getDataSource()); appendFilterInformation(plan, op.getMinFilterVars(), op.getMaxFilterVars()); appendSelectConditionInformation(plan, op.getSelectCondition(), indent); appendLimitInformation(plan, op.getOutputLimit()); return null; }
if (scan.getSelectCondition() != null) { tupleFilterFactory = context.getMetadataProvider().createTupleFilterFactory( new IOperatorSchema[] { opSchema }, typeEnv, scan.getSelectCondition().getValue(), context);
@Override public Void visitDataScanOperator(DataSourceScanOperator op, Integer indent) throws AlgebricksException { AlgebricksAppendable plan = addIndent(indent).append("\"operator\": \"data-scan\""); if (!op.getProjectVariables().isEmpty()) { addIndent(0).append(",\n"); addIndent(indent).append("\"project-variables\": ["); appendVars(op.getProjectVariables()); buffer.append("]"); } variablePrintHelper(op.getVariables(), indent); if (op.getDataSource() != null) { addIndent(0).append(",\n"); addIndent(indent).append("\"data-source\": \"" + op.getDataSource() + "\""); } appendFilterInformation(plan, op.getMinFilterVars(), op.getMaxFilterVars(), indent); appendSelectConditionInformation(plan, op.getSelectCondition(), indent); appendLimitInformation(plan, op.getOutputLimit(), indent); return null; }