Examples of AggregateNode


Examples of com.odiago.flumebase.plan.AggregateNode

        aggregateOverFields = mGroupBy.getFieldTypes();
      }

      LOG.debug("Aggregate exprs: " + StringUtils.listToStr(mAggregateExprs));
      assert flowSpec.getConf() != null;
      PlanNode aggregateNode = new AggregateNode(aggregateOverFields,
          mAggregateOver, mAggregateExprs, groupByPropagateFields, flowSpec.getConf());
      flowSpec.attachToLastLayer(aggregateNode);

      // Output schema for this layer contains everything we need to forward
      // from our upstream layers...
      List<TypedField> aggOutputFields = new ArrayList<TypedField>();
      aggOutputFields.addAll(groupByPropagateFields);
      // As well as the names of everything we calculate in this layer.
      for (AliasedExpr aliasExpr : mAggregateExprs) {
        Expr e = aliasExpr.getExpr();
        Type t = e.getType(fieldSymbols);
        TypedField aggregateField = new TypedField(
          aliasExpr.getUserAlias(), t,
          aliasExpr.getAvroLabel(), aliasExpr.getDisplayLabel());
        aggOutputFields.add(aggregateField);
      }
      Schema aggregateOutSchema = createFieldSchema(aggOutputFields);
      aggregateNode.setAttr(PlanNode.OUTPUT_SCHEMA_ATTR, aggregateOutSchema);
    }
  }
View Full Code Here

Examples of com.odiago.flumebase.plan.AggregateNode

      ProjectionNode projNode = (ProjectionNode) node;
      Schema outSchema = (Schema) projNode.getAttr(PlanNode.OUTPUT_SCHEMA_ATTR);
      newElem = new ProjectionElement(newContext, outSchema, projNode.getInputFields(),
          projNode.getOutputFields());
    } else if (node instanceof AggregateNode) {
      AggregateNode aggNode = (AggregateNode) node;
      newElem = new BucketedAggregationElement(newContext, aggNode);
    } else if (node instanceof EvaluateExprsNode) {
      EvaluateExprsNode evalNode = (EvaluateExprsNode) node;
      Schema outSchema = (Schema) evalNode.getAttr(PlanNode.OUTPUT_SCHEMA_ATTR);
      newElem = new EvaluationElement(newContext, evalNode.getExprs(),
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                                                                null,
                                                                org.apache.derby.impl.sql.compile.CountAggregateDefinition.class,
                                                                Boolean.FALSE, // distinct Boolean.TRUE?
                                                                "COUNT(*)",
                                                                getContextManager());
                        AggregateNode n = (AggregateNode) vn;
                        n.replaceAggregatesWithColumnReferences(selectList, 0);
                }

                selectNode = (SelectNode) nodeFactory.getNode(
                                                        C_NodeTypes.SELECT_NODE,
                                                        selectList,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                {
                        {if (true) throw StandardException.newException(SQLState.LANG_SYNTAX_ERROR, "?");}
                }
                if (columnExpression instanceof AggregateNode)
                {
                        AggregateNode agNode = (AggregateNode)columnExpression;
                        {if (true) throw StandardException.newException(
                                SQLState.LANG_AGGREGATE_IN_GROUPBY_LIST,
                                agNode.getAggregateName());}
                }
                groupingCols.addGroupByColumn(
                        (GroupByColumn) nodeFactory.getNode(
                                                        C_NodeTypes.GROUP_BY_COLUMN,
                                                        columnExpression,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                                                                null,
                                                                org.apache.derby.impl.sql.compile.CountAggregateDefinition.class,
                                                                Boolean.FALSE, // distinct Boolean.TRUE?
                                                                "COUNT(*)",
                                                                getContextManager());
                        AggregateNode n = (AggregateNode) vn;
                        n.replaceAggregatesWithColumnReferences(selectList, 0);
                }

                selectNode = (SelectNode) nodeFactory.getNode(
                                                        C_NodeTypes.SELECT_NODE,
                                                        selectList,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                {
                        {if (true) throw StandardException.newException(SQLState.LANG_SYNTAX_ERROR, "?");}
                }
                if (columnExpression instanceof AggregateNode)
                {
                        AggregateNode agNode = (AggregateNode)columnExpression;
                        {if (true) throw StandardException.newException(
                                SQLState.LANG_AGGREGATE_IN_GROUPBY_LIST,
                                agNode.getAggregateName());}
                }
                groupingCols.addGroupByColumn(
                        (GroupByColumn) nodeFactory.getNode(
                                                        C_NodeTypes.GROUP_BY_COLUMN,
                                                        columnExpression,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                                                                null,
                                                                org.apache.derby.impl.sql.compile.CountAggregateDefinition.class,
                                                                Boolean.FALSE, // distinct Boolean.TRUE?
                                                                "COUNT(*)",
                                                                getContextManager());
                        AggregateNode n = (AggregateNode) vn;
                        n.replaceAggregatesWithColumnReferences(selectList, 0);
                }

                selectNode = (SelectNode) nodeFactory.getNode(
                                                        C_NodeTypes.SELECT_NODE,
                                                        selectList,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                                                                null,
                                                                org.apache.derby.impl.sql.compile.CountAggregateDefinition.class,
                                                                Boolean.FALSE, // distinct Boolean.TRUE?
                                                                "COUNT(*)",
                                                                getContextManager());
                        AggregateNode n = (AggregateNode) vn;
                        n.replaceAggregatesWithColumnReferences(selectList, 0);
                }

                selectNode = (SelectNode) nodeFactory.getNode(
                                                        C_NodeTypes.SELECT_NODE,
                                                        selectList,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                {
                        {if (true) throw StandardException.newException(SQLState.LANG_SYNTAX_ERROR, "?");}
                }
                if (columnExpression instanceof AggregateNode)
                {
                        AggregateNode agNode = (AggregateNode)columnExpression;
                        {if (true) throw StandardException.newException(
                                SQLState.LANG_AGGREGATE_IN_GROUPBY_LIST,
                                agNode.getAggregateName());}
                }
                groupingCols.addGroupByColumn(
                        (GroupByColumn) nodeFactory.getNode(
                                                        C_NodeTypes.GROUP_BY_COLUMN,
                                                        columnExpression,
View Full Code Here

Examples of org.apache.derby.impl.sql.compile.AggregateNode

                                                                null,
                                                                org.apache.derby.impl.sql.compile.CountAggregateDefinition.class,
                                                                Boolean.FALSE, // distinct Boolean.TRUE?
                                                                "COUNT(*)",
                                                                getContextManager());
                        AggregateNode n = (AggregateNode) vn;
                        n.replaceAggregatesWithColumnReferences(selectList, 0);
                }

                selectNode = (SelectNode) nodeFactory.getNode(
                                                        C_NodeTypes.SELECT_NODE,
                                                        selectList,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.