test_class.declarator: conf
test_class.modifier: private static
test_class.original_string: private static TajoConf conf;
test_class.type: TajoConf
test_class.var_name: conf
test_class.declarator: TEST_PATH = "target/test-data/TestPhysicalPlanner"
test_class.modifier: private static final
test_class.original_string: private static final String TEST_PATH = "target/test-data/TestPhysicalPlanner";
test_class.type: String
test_class.var_name: TEST_PATH
test_class.declarator: util
test_class.modifier: private static
test_class.original_string: private static TajoTestingCluster util;
test_class.type: TajoTestingCluster
test_class.var_name: util
test_class.declarator: catalog
test_class.modifier: private static
test_class.original_string: private static CatalogService catalog;
test_class.type: CatalogService
test_class.var_name: catalog
test_class.declarator: analyzer
test_class.modifier: private static
test_class.original_string: private static SQLAnalyzer analyzer;
test_class.type: SQLAnalyzer
test_class.var_name: analyzer
test_class.declarator: planner
test_class.modifier: private static
test_class.original_string: private static LogicalPlanner planner;
test_class.type: LogicalPlanner
test_class.var_name: planner
test_class.declarator: optimizer
test_class.modifier: private static
test_class.original_string: private static LogicalOptimizer optimizer;
test_class.type: LogicalOptimizer
test_class.var_name: optimizer
test_class.declarator: sm
test_class.modifier: private static
test_class.original_string: private static AbstractStorageManager sm;
test_class.type: AbstractStorageManager
test_class.var_name: sm
test_class.declarator: workDir
test_class.modifier: private static
test_class.original_string: private static Path workDir;
test_class.type: Path
test_class.var_name: workDir
test_class.declarator: tablePath
test_class.modifier: private static
test_class.original_string: private static Path tablePath;
test_class.type: Path
test_class.var_name: tablePath
test_class.declarator: employeeMeta
test_class.modifier: private static
test_class.original_string: private static TableMeta employeeMeta;
test_class.type: TableMeta
test_class.var_name: employeeMeta
test_class.declarator: rnd = new Random(System.currentTimeMillis())
test_class.modifier: private static
test_class.original_string: private static Random rnd = new Random(System.currentTimeMillis());
test_class.type: Random
test_class.var_name: rnd
test_class.declarator: QUERIES = {
        "select managerId, empId, deptName from employee order by managerId, empId desc" }
test_class.modifier: public static
test_class.original_string: public static String[] QUERIES = {
        "select managerId, empId, deptName from employee order by managerId, empId desc" };
test_class.type: String[]
test_class.var_name: QUERIES
test_class.file: tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
test_class.identifier: TestSortExec
test_case.body: @Test
    public final void testNext() throws IOException, PlanningException {
      FileFragment[] frags = StorageManager.splitNG(conf, "default.employee", employeeMeta, tablePath, Integer.MAX_VALUE);
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/TestSortExec");
      TaskAttemptContext ctx = new TaskAttemptContext(conf, LocalTajoTestingUtility
          .newQueryUnitAttemptId(), new FileFragment[] { frags[0] }, workDir);
      ctx.setEnforcer(new Enforcer());
      Expr context = analyzer.parse(QUERIES[0]);
      LogicalPlan plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(), context);
      LogicalNode rootNode = optimizer.optimize(plan);
  
      PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf, sm);
      PhysicalExec exec = phyPlanner.createPlan(ctx, rootNode);
  
      Tuple tuple;
      Datum preVal = null;
      Datum curVal;
      exec.init();
      while ((tuple = exec.next()) != null) {
        curVal = tuple.get(0);
        if (preVal != null) {
          assertTrue(preVal.lessThanEqual(curVal).asBool());
        }
  
        preVal = curVal;
      }
      exec.close();
    }
test_case.class_method_signature: TestSortExec.testNext()
test_case.full_signature: @Test public final void testNext()
test_case.identifier: testNext
test_case.invocations: splitNG getTestDir newQueryUnitAttemptId setEnforcer parse createPlan createDummySession optimize createPlan init next get assertTrue asBool lessThanEqual close
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNext()
focal_class.declarator: comparator
focal_class.modifier: private final
focal_class.original_string: private final Comparator<Tuple> comparator;
focal_class.type: Comparator<Tuple>
focal_class.var_name: comparator
focal_class.declarator: sortSpecs
focal_class.modifier: private final
focal_class.original_string: private final SortSpec [] sortSpecs;
focal_class.type: SortSpec []
focal_class.var_name: sortSpecs
focal_class.file: tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/SortExec.java
focal_class.identifier: SortExec
focal_class.class_method_signature: SortExec.SortExec(TaskAttemptContext context, Schema inSchema,
                    Schema outSchema, PhysicalExec child, SortSpec [] sortSpecs)
focal_class.full_signature: public  SortExec(TaskAttemptContext context, Schema inSchema,
                    Schema outSchema, PhysicalExec child, SortSpec [] sortSpecs)
focal_class.identifier: SortExec
focal_class.modifiers: public
focal_class.parameters: (TaskAttemptContext context, Schema inSchema,
                    Schema outSchema, PhysicalExec child, SortSpec [] sortSpecs)
focal_class.signature:  SortExec(TaskAttemptContext context, Schema inSchema,
                    Schema outSchema, PhysicalExec child, SortSpec [] sortSpecs)
focal_class.class_method_signature: SortExec.getSortSpecs()
focal_class.full_signature: public SortSpec[] getSortSpecs()
focal_class.identifier: getSortSpecs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: SortSpec[]
focal_class.signature: SortSpec[] getSortSpecs()
focal_class.class_method_signature: SortExec.getComparator()
focal_class.full_signature: public Comparator<Tuple> getComparator()
focal_class.identifier: getComparator
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Comparator<Tuple>
focal_class.signature: Comparator<Tuple> getComparator()
focal_class.class_method_signature: SortExec.next()
focal_class.full_signature: @Override abstract public Tuple next()
focal_class.identifier: next
focal_class.modifiers: @Override abstract public
focal_class.parameters: ()
focal_class.return: Tuple
focal_class.signature: Tuple next()
focal_class.superclass: extends UnaryPhysicalExec
focal_method.body: @Override
    abstract public Tuple next() throws IOException;
focal_method.class_method_signature: SortExec.next()
focal_method.full_signature: @Override abstract public Tuple next()
focal_method.identifier: next
focal_method.modifiers: @Override abstract public
focal_method.parameters: ()
focal_method.return: Tuple
focal_method.signature: Tuple next()