for (LogicalVariable pk : pkVars) { ILogicalOperator mOp = getOpThatProducesPK(op, pk); if (mOp == null || !mOp.getOperatorTag().equals(LogicalOperatorTag.DATASOURCESCAN)) { throw new AlgebricksException("Illegal variable production.");
for (Mutable<ILogicalOperator> mutableOp : intersect.getInputs()) { ILogicalOperator child = mutableOp.getValue(); while (!child.getOperatorTag().equals(LogicalOperatorTag.UNNEST_MAP)) { child = child.getInputs().get(0).getValue(); if (!isIndexOnlyPlan) { throw new CompilationException(ErrorCode.COMPILATION_ILLEGAL_STATE, intersectOrSortOrSplit.getValue().getOperatorTag().toString()); while (!child.getOperatorTag().equals(LogicalOperatorTag.UNNEST_MAP)) { child = child.getInputs().get(0).getValue(); case ORDER: ILogicalOperator child = intersectOrSortOrSplit.getValue().getInputs().get(0).getValue(); if (child.getOperatorTag().equals(LogicalOperatorTag.UNNEST_MAP)) { UnnestMapOperator secondaryMap = (UnnestMapOperator) child; intersectOrSortOrSplit.getValue().getOperatorTag().toString());
private static void computeDefaultPhysicalOp(AbstractLogicalOperator op, boolean topLevelOp, IOptimizationContext context) throws AlgebricksException { PhysicalOptimizationConfig physicalOptimizationConfig = context.getPhysicalOptimizationConfig(); if (op.getOperatorTag().equals(LogicalOperatorTag.GROUP)) { GroupByOperator gby = (GroupByOperator) op; if (gby.getNestedPlans().size() == 1) { if (p0.getRoots().size() == 1) { Mutable<ILogicalOperator> r0 = p0.getRoots().get(0); if (r0.getValue().getOperatorTag().equals(LogicalOperatorTag.AGGREGATE)) { AggregateOperator aggOp = (AggregateOperator) r0.getValue(); boolean serializable = true; } else if (r0.getValue().getOperatorTag().equals(LogicalOperatorTag.RUNNINGAGGREGATE)) { List<Pair<LogicalVariable, Mutable<ILogicalExpression>>> gbyList = gby.getGroupByList(); List<LogicalVariable> columnList = new ArrayList<LogicalVariable>(gbyList.size()); throw new CompilationException(ErrorCode.COMPILATION_ERROR, gby.getSourceLocation(), "Unsupported nested operator within a group-by: " + r0.getValue().getOperatorTag().name());