private IStreamDataReader GetGroupByMergedResult(List <IStreamDataReader> streamDataReaders, SelectCommandContext selectCommandContext, IDictionary <string, int> columnLabelIndexMap, SchemaMetaData schemaMetaData) { if (selectCommandContext.IsSameGroupByAndOrderByItems()) { return(new GroupByStreamMergedDataReader(columnLabelIndexMap, streamDataReaders, selectCommandContext, schemaMetaData)); } return(new GroupByMemoryMergedDataReader(streamDataReaders, selectCommandContext, schemaMetaData)); }
private bool IsMaxRowCount(SelectCommandContext shardingCommand) { return((shardingCommand.GetGroupByContext().GetItems().Any() || shardingCommand.GetProjectionsContext().GetAggregationProjections().Any()) && !shardingCommand.IsSameGroupByAndOrderByItems()); }