test_class.declarator: conf
test_class.modifier: private
test_class.original_string: private TajoConf conf;
test_class.type: TajoConf
test_class.var_name: conf
test_class.declarator: TEST_PATH = "target/test-data/TestNLJoinExec"
test_class.modifier: private final
test_class.original_string: private final String TEST_PATH = "target/test-data/TestNLJoinExec";
test_class.type: String
test_class.var_name: TEST_PATH
test_class.declarator: util
test_class.modifier: private
test_class.original_string: private TajoTestingCluster util;
test_class.type: TajoTestingCluster
test_class.var_name: util
test_class.declarator: catalog
test_class.modifier: private
test_class.original_string: private CatalogService catalog;
test_class.type: CatalogService
test_class.var_name: catalog
test_class.declarator: analyzer
test_class.modifier: private
test_class.original_string: private SQLAnalyzer analyzer;
test_class.type: SQLAnalyzer
test_class.var_name: analyzer
test_class.declarator: planner
test_class.modifier: private
test_class.original_string: private LogicalPlanner planner;
test_class.type: LogicalPlanner
test_class.var_name: planner
test_class.declarator: sm
test_class.modifier: private
test_class.original_string: private AbstractStorageManager sm;
test_class.type: AbstractStorageManager
test_class.var_name: sm
test_class.declarator: testDir
test_class.modifier: private
test_class.original_string: private Path testDir;
test_class.type: Path
test_class.var_name: testDir
test_class.declarator: employee
test_class.modifier: private
test_class.original_string: private TableDesc employee;
test_class.type: TableDesc
test_class.var_name: employee
test_class.declarator: people
test_class.modifier: private
test_class.original_string: private TableDesc people;
test_class.type: TableDesc
test_class.var_name: people
test_class.declarator: masterPlan
test_class.modifier: private
test_class.original_string: private MasterPlan masterPlan;
test_class.type: MasterPlan
test_class.var_name: masterPlan
test_class.declarator: QUERIES = {
      "select managerId, e.empId, deptName, e.memId from employee as e, people p",
      "select managerId, e.empId, deptName, e.memId from employee as e inner join people as p on " +
          "e.empId = p.empId and e.memId = p.fk_memId"
    }
test_class.original_string: String[] QUERIES = {
      "select managerId, e.empId, deptName, e.memId from employee as e, people p",
      "select managerId, e.empId, deptName, e.memId from employee as e inner join people as p on " +
          "e.empId = p.empId and e.memId = p.fk_memId"
    };
test_class.type: String[]
test_class.var_name: QUERIES
test_class.file: tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestNLJoinExec.java
test_class.identifier: TestNLJoinExec
test_case.body: @Test
    public final void testNLCrossJoin() throws IOException, PlanningException {
      FileFragment[] empFrags = StorageManager.splitNG(conf, "default.e", employee.getMeta(), employee.getPath(),
          Integer.MAX_VALUE);
      FileFragment[] peopleFrags = StorageManager.splitNG(conf, "default.p", people.getMeta(), people.getPath(),
          Integer.MAX_VALUE);
      
      FileFragment[] merged = TUtil.concat(empFrags, peopleFrags);
  
      Path workDir = CommonTestingUtil.getTestDir("target/test-data/testNLCrossJoin");
      TaskAttemptContext ctx = new TaskAttemptContext(conf,
          LocalTajoTestingUtility.newQueryUnitAttemptId(), merged, workDir);
      ctx.setEnforcer(new Enforcer());
      Expr context = analyzer.parse(QUERIES[0]);
      LogicalNode plan = planner.createPlan(LocalTajoTestingUtility.createDummySession(),
          context).getRootBlock().getRoot();
  
      PhysicalPlanner phyPlanner = new PhysicalPlannerImpl(conf, sm);
      PhysicalExec exec = phyPlanner.createPlan(ctx, plan);
  
      int i = 0;
      exec.init();
      while (exec.next() != null) {
        i++;
      }
      exec.close();
      assertEquals(50*50/2, i); // expected 10 * 5
    }
test_case.class_method_signature: TestNLJoinExec.testNLCrossJoin()
test_case.full_signature: @Test public final void testNLCrossJoin()
test_case.identifier: testNLCrossJoin
test_case.invocations: splitNG getMeta getPath splitNG getMeta getPath concat getTestDir newQueryUnitAttemptId setEnforcer parse getRoot getRootBlock createPlan createDummySession createPlan init next close assertEquals
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNLCrossJoin()
focal_class.declarator: plan
focal_class.modifier: private
focal_class.original_string: private JoinNode plan;
focal_class.type: JoinNode
focal_class.var_name: plan
focal_class.declarator: joinQual
focal_class.modifier: private
focal_class.original_string: private EvalNode joinQual;
focal_class.type: EvalNode
focal_class.var_name: joinQual
focal_class.declarator: needNewOuter
focal_class.modifier: private
focal_class.original_string: private boolean needNewOuter;
focal_class.type: boolean
focal_class.var_name: needNewOuter
focal_class.declarator: frameTuple
focal_class.modifier: private
focal_class.original_string: private FrameTuple frameTuple;
focal_class.type: FrameTuple
focal_class.var_name: frameTuple
focal_class.declarator: outerTuple = null
focal_class.modifier: private
focal_class.original_string: private Tuple outerTuple = null;
focal_class.type: Tuple
focal_class.var_name: outerTuple
focal_class.declarator: innerTuple = null
focal_class.modifier: private
focal_class.original_string: private Tuple innerTuple = null;
focal_class.type: Tuple
focal_class.var_name: innerTuple
focal_class.declarator: outTuple = null
focal_class.modifier: private
focal_class.original_string: private Tuple outTuple = null;
focal_class.type: Tuple
focal_class.var_name: outTuple
focal_class.declarator: projector
focal_class.modifier: private final
focal_class.original_string: private final Projector projector;
focal_class.type: Projector
focal_class.var_name: projector
focal_class.file: tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/NLJoinExec.java
focal_class.identifier: NLJoinExec
focal_class.class_method_signature: NLJoinExec.NLJoinExec(TaskAttemptContext context, JoinNode plan, PhysicalExec outer,
        PhysicalExec inner)
focal_class.full_signature: public  NLJoinExec(TaskAttemptContext context, JoinNode plan, PhysicalExec outer,
        PhysicalExec inner)
focal_class.identifier: NLJoinExec
focal_class.modifiers: public
focal_class.parameters: (TaskAttemptContext context, JoinNode plan, PhysicalExec outer,
        PhysicalExec inner)
focal_class.signature:  NLJoinExec(TaskAttemptContext context, JoinNode plan, PhysicalExec outer,
        PhysicalExec inner)
focal_class.class_method_signature: NLJoinExec.getPlan()
focal_class.full_signature: public JoinNode getPlan()
focal_class.identifier: getPlan
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: JoinNode
focal_class.signature: JoinNode getPlan()
focal_class.class_method_signature: NLJoinExec.next()
focal_class.full_signature: public Tuple next()
focal_class.identifier: next
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Tuple
focal_class.signature: Tuple next()
focal_class.class_method_signature: NLJoinExec.rescan()
focal_class.full_signature: @Override public void rescan()
focal_class.identifier: rescan
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rescan()
focal_class.superclass: extends BinaryPhysicalExec
focal_method.body: public Tuple next() throws IOException {
      for (;;) {
        if (needNewOuter) {
          outerTuple = leftChild.next();
          if (outerTuple == null) {
            return null;
          }
          needNewOuter = false;
        }
  
        innerTuple = rightChild.next();
        if (innerTuple == null) {
          needNewOuter = true;
          rightChild.rescan();
          continue;
        }
  
        frameTuple.set(outerTuple, innerTuple);
        if (joinQual != null) {
          if (joinQual.eval(inSchema, frameTuple).isTrue()) {
            projector.eval(frameTuple, outTuple);
            return outTuple;
          }
        } else {
          projector.eval(frameTuple, outTuple);
          return outTuple;
        }
      }
    }
focal_method.class_method_signature: NLJoinExec.next()
focal_method.full_signature: public Tuple next()
focal_method.identifier: next
focal_method.invocations: next next rescan set isTrue eval eval eval
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: Tuple
focal_method.signature: Tuple next()