@Override public Void visitIndexInsertDeleteUpsertOperator(IndexInsertDeleteUpsertOperator op, Pair<LogicalVariable, LogicalVariable> pair) throws AlgebricksException { for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().substituteVar(pair.first, pair.second); } for (Mutable<ILogicalExpression> e : op.getSecondaryKeyExpressions()) { e.getValue().substituteVar(pair.first, pair.second); } substVarTypes(op, pair); return null; }
@Override public ILogicalOperator visitIndexInsertDeleteUpsertOperator(IndexInsertDeleteUpsertOperator op, Void arg) throws AlgebricksException { List<Mutable<ILogicalExpression>> newPrimaryKeyExpressions = new ArrayList<>(); deepCopyExpressionRefs(newPrimaryKeyExpressions, op.getPrimaryKeyExpressions()); List<Mutable<ILogicalExpression>> newSecondaryKeyExpressions = new ArrayList<>(); deepCopyExpressionRefs(newSecondaryKeyExpressions, op.getSecondaryKeyExpressions()); Mutable<ILogicalExpression> newFilterExpression = new MutableObject<>(((AbstractLogicalExpression) op.getFilterExpression()).cloneExpression()); List<Mutable<ILogicalExpression>> newLSMComponentFilterExpressions = new ArrayList<>(); deepCopyExpressionRefs(newLSMComponentFilterExpressions, op.getAdditionalFilteringExpressions()); IndexInsertDeleteUpsertOperator indexInsertDeleteOp = new IndexInsertDeleteUpsertOperator( op.getDataSourceIndex(), newPrimaryKeyExpressions, newSecondaryKeyExpressions, newFilterExpression, op.getOperation(), op.isBulkload(), op.getNumberOfAdditionalNonFilteringFields()); indexInsertDeleteOp.setAdditionalFilteringExpressions(newLSMComponentFilterExpressions); return indexInsertDeleteOp; }
IndexInsertDeleteUpsertOperator operator = (IndexInsertDeleteUpsertOperator) descendantOp; if (!operator.isBulkload() && operator.getPrevSecondaryKeyExprs() == null) { primaryKeyExprs = operator.getPrimaryKeyExpressions(); dataset = ((DatasetDataSource) operator.getDataSourceIndex().getDataSource()).getDataset(); break;
@Override public Void visitIndexInsertDeleteUpsertOperator(IndexInsertDeleteUpsertOperator op, Void arg) { for (Mutable<ILogicalExpression> e : op.getPrimaryKeyExpressions()) { e.getValue().getUsedVariables(usedVariables); } for (Mutable<ILogicalExpression> e : op.getSecondaryKeyExpressions()) { e.getValue().getUsedVariables(usedVariables); } if (op.getFilterExpression() != null) { op.getFilterExpression().getValue().getUsedVariables(usedVariables); } if (op.getAdditionalFilteringExpressions() != null) { for (Mutable<ILogicalExpression> e : op.getAdditionalFilteringExpressions()) { e.getValue().getUsedVariables(usedVariables); } } if (op.getPrevAdditionalFilteringExpression() != null) { op.getPrevAdditionalFilteringExpression().getValue().getUsedVariables(usedVariables); } if (op.getPrevSecondaryKeyExprs() != null) { for (Mutable<ILogicalExpression> e : op.getPrevSecondaryKeyExprs()) { e.getValue().getUsedVariables(usedVariables); } } if (op.getUpsertIndicatorExpr() != null) { op.getUpsertIndicatorExpr().getValue().getUsedVariables(usedVariables); } return null; }
List<LogicalVariable> secondaryKeys = new ArrayList<LogicalVariable>(); List<LogicalVariable> additionalFilteringKeys = null; getKeys(opInsDel.getPrimaryKeyExpressions(), primaryKeys); getKeys(opInsDel.getSecondaryKeyExpressions(), secondaryKeys); if (opInsDel.getAdditionalFilteringExpressions() != null) {