@Test public void testdefect9842() throws Exception { BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager(); ElementSymbol col1 = new ElementSymbol("col1"); col1.setType(Integer.class); ElementSymbol bigDecimal = new ElementSymbol("value"); bigDecimal.setType(DataTypeManager.DefaultDataClasses.BIG_DECIMAL); GroupingNode node = new GroupingNode(1); List outputElements = new ArrayList(); outputElements.add(col1); outputElements.add(new AggregateSymbol("SUM", false, bigDecimal)); outputElements.add(new AggregateSymbol("AVG", false, bigDecimal)); node.setElements(outputElements); List groupingElements = new ArrayList(); groupingElements.add(col1); node.setOrderBy(new OrderBy(groupingElements).getOrderByItems()); CommandContext context = new CommandContext("pid", "test", null, null, 1); List[] data = new List[] { Arrays.asList(new Object[] { new Integer(1), new BigDecimal("0.0") }), Arrays.asList(new Object[] { new Integer(1), new BigDecimal("1.0") }), Arrays.asList(new Object[] { new Integer(2), new BigDecimal("2.0") }), Arrays.asList(new Object[] { new Integer(2), new BigDecimal("3.0") }), Arrays.asList(new Object[] { new Integer(2), new BigDecimal("4.0") }) }; List[] expected = new List[] { Arrays.asList(new Object[] { new Integer(1), new BigDecimal("1.0"), new BigDecimal(.5) }), Arrays.asList(new Object[] { new Integer(2), new BigDecimal("9.0"), new BigDecimal("3.0") }) }; List symbols = new ArrayList(); symbols.add(col1); symbols.add(bigDecimal); FakeTupleSource dataSource = new FakeTupleSource(symbols, data); helpProcess(mgr, node, context, expected, dataSource, null); }
public void setOrderBy(List<OrderByItem> orderBy) { this.orderBy = orderBy; }
GroupingNode extends SubqueryAwareRelationalNode { public void setOrderBy(List<OrderByItem> orderBy) { this.orderBy = orderBy; } }
GroupingNode extends SubqueryAwareRelationalNode { public void setOrderBy(List<OrderByItem> orderBy) { this.orderBy = orderBy; } GroupingNode(int nodeID); }
GroupingNode extends SubqueryAwareRelationalNode { public void setOrderBy(List<OrderByItem> orderBy) { this.orderBy = orderBy; } GroupingNode(int nodeID); void reset(); void setRemoveDuplicates(boolean removeDuplicates); void setOrderBy(List<OrderByItem> orderBy); void setOutputMapping(SymbolMap outputMapping); @Override void initialize(CommandContext context, BufferManager bufferManager,
            ProcessorDataManager dataMgr); TupleBatch nextBatchDirect(); TupleSource getGroupSortTupleSource(); @Override Collection<? extends LanguageObject> getObjects(); static int sameGroup(int[] indexes, List<?> newTuple, List<?> oldTuple); void closeDirect(); Object clone(); PlanNode getDescriptionProperties(); void setRollup(boolean rollup); }
GroupingNode extends SubqueryAwareRelationalNode { public void setOrderBy(List<OrderByItem> orderBy) { this.orderBy = orderBy; } GroupingNode(int nodeID); void reset(); void setRemoveDuplicates(boolean removeDuplicates); void setOrderBy(List<OrderByItem> orderBy); void setOutputMapping(SymbolMap outputMapping); @Override void initialize(CommandContext context, BufferManager bufferManager,
            ProcessorDataManager dataMgr); TupleBatch nextBatchDirect(); TupleSource getGroupSortTupleSource(); @Override Collection<? extends LanguageObject> getObjects(); static int sameGroup(int[] indexes, List<?> newTuple, List<?> oldTuple); void closeDirect(); Object clone(); PlanNode getDescriptionProperties(); void setRollup(boolean rollup);  }