GroupByStreamMergedResult extends OrderByStreamMergedResult { @Override public boolean next() throws SQLException { currentRow.clear(); if (getOrderByValuesQueue().isEmpty()) { return false; } if (isFirstNext()) { super.next(); } if (aggregateCurrentGroupByRowAndNext()) { currentGroupByValues = new GroupByValue(getCurrentQueryResult(), selectStatementContext.getGroupByContext().getItems()).getGroupValues(); } return true; } GroupByStreamMergedResult(final Map<String, Integer> labelAndIndexMap, final List<QueryResult> queryResults,
                                     final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData); @Override boolean next(); @Override Object getValue(final int columnIndex, final Class<?> type); @Override Object getCalendarValue(final int columnIndex, final Class<?> type, final Calendar calendar);  }
@Test public void assertNextForResultSetsAllEmpty() throws SQLException { ShardingDQLResultMerger resultMerger = new ShardingDQLResultMerger(DatabaseTypes.getActualDatabaseType("MySQL")); MergedResult actual = resultMerger.merge(Arrays.asList(createQueryResult(), createQueryResult(), createQueryResult()), createSelectStatementContext(), createSchemaMetaData()); assertFalse(actual.next()); }