test_class.declarator: selectStatementContext
test_class.modifier: private
test_class.original_string: private SelectStatementContext selectStatementContext;
test_class.type: SelectStatementContext
test_class.var_name: selectStatementContext
test_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-merge/src/test/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResultTest.java
test_class.identifier: OrderByStreamMergedResultTest
test_case.body: @Test
      public void assertNextForResultSetsAllEmpty() throws SQLException {
          List<QueryResult> queryResults = Arrays.asList(mock(QueryResult.class), mock(QueryResult.class), mock(QueryResult.class));
          ShardingDQLResultMerger resultMerger = new ShardingDQLResultMerger(DatabaseTypes.getActualDatabaseType("MySQL"));
          MergedResult actual = resultMerger.merge(queryResults, selectStatementContext, createSchemaMetaData());
          assertFalse(actual.next());
      }
test_case.class_method_signature: OrderByStreamMergedResultTest.assertNextForResultSetsAllEmpty()
test_case.full_signature: @Test public void assertNextForResultSetsAllEmpty()
test_case.identifier: assertNextForResultSetsAllEmpty
test_case.invocations: asList mock mock mock getActualDatabaseType merge createSchemaMetaData assertFalse next
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertNextForResultSetsAllEmpty()
focal_class.declarator: orderByItems
focal_class.modifier: private final
focal_class.original_string: private final Collection<OrderByItem> orderByItems;
focal_class.type: Collection<OrderByItem>
focal_class.var_name: orderByItems
focal_class.declarator: orderByValuesQueue
focal_class.modifier: @Getter(AccessLevel.PROTECTED)
      private final
focal_class.original_string: @Getter(AccessLevel.PROTECTED)
      private final Queue<OrderByValue> orderByValuesQueue;
focal_class.type: Queue<OrderByValue>
focal_class.var_name: orderByValuesQueue
focal_class.declarator: isFirstNext
focal_class.modifier: @Getter(AccessLevel.PROTECTED)
      private
focal_class.original_string: @Getter(AccessLevel.PROTECTED)
      private boolean isFirstNext;
focal_class.type: boolean
focal_class.var_name: isFirstNext
focal_class.file: shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-merge/src/main/java/org/apache/shardingsphere/sharding/merge/dql/orderby/OrderByStreamMergedResult.java
focal_class.identifier: OrderByStreamMergedResult
focal_class.class_method_signature: OrderByStreamMergedResult.OrderByStreamMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.full_signature: public  OrderByStreamMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.identifier: OrderByStreamMergedResult
focal_class.modifiers: public
focal_class.parameters: (final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.signature:  OrderByStreamMergedResult(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: OrderByStreamMergedResult.orderResultSetsToQueue(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.full_signature: private void orderResultSetsToQueue(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.identifier: orderResultSetsToQueue
focal_class.modifiers: private
focal_class.parameters: (final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.return: void
focal_class.signature: void orderResultSetsToQueue(final List<QueryResult> queryResults, final SelectStatementContext selectStatementContext, final SchemaMetaData schemaMetaData)
focal_class.class_method_signature: OrderByStreamMergedResult.next()
focal_class.full_signature: @Override public boolean next()
focal_class.identifier: next
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean next()
focal_class.superclass: extends StreamMergedResult
focal_method.body: @Override
      public boolean next() throws SQLException {
          if (orderByValuesQueue.isEmpty()) {
              return false;
          }
          if (isFirstNext) {
              isFirstNext = false;
              return true;
          }
          OrderByValue firstOrderByValue = orderByValuesQueue.poll();
          if (firstOrderByValue.next()) {
              orderByValuesQueue.offer(firstOrderByValue);
          }
          if (orderByValuesQueue.isEmpty()) {
              return false;
          }
          setCurrentQueryResult(orderByValuesQueue.peek().getQueryResult());
          return true;
      }
focal_method.class_method_signature: OrderByStreamMergedResult.next()
focal_method.full_signature: @Override public boolean next()
focal_method.identifier: next
focal_method.invocations: isEmpty poll next offer isEmpty setCurrentQueryResult getQueryResult peek
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean next()