test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-merge/src/test/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMergerTest.java
test_class.identifier: ShardingDQLResultMergerTest
test_case.body: @Test
      public void assertBuildGroupByMemoryMergedResultWithOracleLimit() throws SQLException {
          ShardingDQLResultMerger resultMerger = new ShardingDQLResultMerger(DatabaseTypes.getActualDatabaseType("Oracle"));
          SelectStatementContext selectStatementContext = new SelectStatementContext(createSelectStatement(new OracleSelectStatement()),
                  new GroupByContext(Collections.singletonList(new OrderByItem(new IndexOrderByItemSegment(0, 0, 1, OrderDirection.DESC, OrderDirection.ASC))), 0),
                  new OrderByContext(Collections.singletonList(new OrderByItem(new IndexOrderByItemSegment(0, 0, 2, OrderDirection.DESC, OrderDirection.ASC))), false),
                  new ProjectionsContext(0, 0, false, Collections.emptyList()), 
                  new PaginationContext(new NumberLiteralRowNumberValueSegment(0, 0, 1, true), null, Collections.emptyList()));
          MergedResult actual = resultMerger.merge(createQueryResults(), selectStatementContext, createSchemaMetaData());
          assertThat(actual, instanceOf(RowNumberDecoratorMergedResult.class));
          assertThat(((RowNumberDecoratorMergedResult) actual).getMergedResult(), instanceOf(GroupByMemoryMergedResult.class));
      }
test_case.class_method_signature: ShardingDQLResultMergerTest.assertBuildGroupByMemoryMergedResultWithOracleLimit()
test_case.full_signature: @Test public void assertBuildGroupByMemoryMergedResultWithOracleLimit()
test_case.identifier: assertBuildGroupByMemoryMergedResultWithOracleLimit
test_case.invocations: getActualDatabaseType createSelectStatement singletonList singletonList emptyList emptyList merge createQueryResults createSchemaMetaData assertThat instanceOf assertThat getMergedResult instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertBuildGroupByMemoryMergedResultWithOracleLimit()
focal_class.declarator: databaseType
focal_class.modifier: private final
focal_class.original_string: private final DatabaseType databaseType;
focal_class.type: DatabaseType
focal_class.var_name: databaseType
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-merge/src/main/java/org/apache/shardingsphere/sharding/merge/dql/ShardingDQLResultMerger.java
focal_class.identifier: ShardingDQLResultMerger
focal_class.interfaces: implements ResultMerger
focal_class.class_method_signature: ShardingDQLResultMerger.merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_class.full_signature: @Override public MergedResult merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_class.return: MergedResult
focal_class.signature: MergedResult merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: ShardingDQLResultMerger.getColumnLabelIndexMap(final QueryResult queryResult)
focal_class.full_signature: private Map<String, Integer> getColumnLabelIndexMap(final QueryResult queryResult)
focal_class.identifier: getColumnLabelIndexMap
focal_class.modifiers: private
focal_class.parameters: (final QueryResult queryResult)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> getColumnLabelIndexMap(final QueryResult queryResult)
focal_class.class_method_signature: ShardingDQLResultMerger.build(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                 final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.full_signature: private MergedResult build(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                 final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.identifier: build
focal_class.modifiers: private
focal_class.parameters: (final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                 final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.return: MergedResult
focal_class.signature: MergedResult build(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                 final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: ShardingDQLResultMerger.isNeedProcessGroupBy(final SelectStatementContext selectStatementContext)
focal_class.full_signature: private boolean isNeedProcessGroupBy(final SelectStatementContext selectStatementContext)
focal_class.identifier: isNeedProcessGroupBy
focal_class.modifiers: private
focal_class.parameters: (final SelectStatementContext selectStatementContext)
focal_class.return: boolean
focal_class.signature: boolean isNeedProcessGroupBy(final SelectStatementContext selectStatementContext)
focal_class.class_method_signature: ShardingDQLResultMerger.isNeedProcessDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.full_signature: private boolean isNeedProcessDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.identifier: isNeedProcessDistinctRow
focal_class.modifiers: private
focal_class.parameters: (final SelectStatementContext selectStatementContext)
focal_class.return: boolean
focal_class.signature: boolean isNeedProcessDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.class_method_signature: ShardingDQLResultMerger.setGroupByForDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.full_signature: private void setGroupByForDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.identifier: setGroupByForDistinctRow
focal_class.modifiers: private
focal_class.parameters: (final SelectStatementContext selectStatementContext)
focal_class.return: void
focal_class.signature: void setGroupByForDistinctRow(final SelectStatementContext selectStatementContext)
focal_class.class_method_signature: ShardingDQLResultMerger.getGroupByMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                                  final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.full_signature: private MergedResult getGroupByMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                                  final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.identifier: getGroupByMergedResult
focal_class.modifiers: private
focal_class.parameters: (final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                                  final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.return: MergedResult
focal_class.signature: MergedResult getGroupByMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext,
                                                  final Map<String, Integer> columnLabelIndexMap, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: ShardingDQLResultMerger.isNeedProcessOrderBy(final SelectStatementContext selectStatementContext)
focal_class.full_signature: private boolean isNeedProcessOrderBy(final SelectStatementContext selectStatementContext)
focal_class.identifier: isNeedProcessOrderBy
focal_class.modifiers: private
focal_class.parameters: (final SelectStatementContext selectStatementContext)
focal_class.return: boolean
focal_class.signature: boolean isNeedProcessOrderBy(final SelectStatementContext selectStatementContext)
focal_class.class_method_signature: ShardingDQLResultMerger.decorate(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final MergedResult mergedResult)
focal_class.full_signature: private MergedResult decorate(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final MergedResult mergedResult)
focal_class.identifier: decorate
focal_class.modifiers: private
focal_class.parameters: (final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final MergedResult mergedResult)
focal_class.return: MergedResult
focal_class.signature: MergedResult decorate(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final MergedResult mergedResult)
focal_method.body: @Override
      public MergedResult merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData) throws SQLException {
          if (1 == queryResults.size()) {
              return new IteratorStreamMergedResult(queryResults);
          }
          Map<String, Integer> columnLabelIndexMap = getColumnLabelIndexMap(queryResults.get(0));
          SelectStatementContext selectStatementContext = (SelectStatementContext) sqlStatementContext;
          selectStatementContext.setIndexes(columnLabelIndexMap);
          MergedResult mergedResult = build(queryResults, selectStatementContext, columnLabelIndexMap, schemaMetaData);
          return decorate(queryResults, selectStatementContext, mergedResult);
      }
focal_method.class_method_signature: ShardingDQLResultMerger.merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_method.full_signature: @Override public MergedResult merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_method.identifier: merge
focal_method.invocations: size getColumnLabelIndexMap get setIndexes build decorate
focal_method.modifiers: @Override public
focal_method.parameters: (final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)
focal_method.return: MergedResult
focal_method.signature: MergedResult merge(final List<QueryResult> queryResults, final SQLStatementContext<?> sqlStatementContext, final SchemaMetaData schemaMetaData)