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: session = LocalTajoTestingUtility.createDummySession()
test_class.modifier: private static
test_class.original_string: private static Session session = LocalTajoTestingUtility.createDummySession();
test_class.type: Session
test_class.var_name: session
test_class.file: tajo-core/src/test/java/org/apache/tajo/engine/planner/TestPlannerUtil.java
test_class.identifier: TestPlannerUtil
test_case.body: @Test
    public final void testGetSortKeysFromJoinQual() {
      Schema outerSchema = new Schema();
      outerSchema.addColumn("employee.id1", CatalogUtil.newSimpleDataType(Type.INT4));
      outerSchema.addColumn("employee.id2", CatalogUtil.newSimpleDataType(Type.INT4));
      Schema innerSchema = new Schema();
      innerSchema.addColumn("people.fid1", CatalogUtil.newSimpleDataType(Type.INT4));
      innerSchema.addColumn("people.fid2", CatalogUtil.newSimpleDataType(Type.INT4));
  
      FieldEval f1 = new FieldEval("employee.id1", CatalogUtil.newSimpleDataType(Type.INT4));
      FieldEval f2 = new FieldEval("people.fid1", CatalogUtil.newSimpleDataType(Type.INT4));
      FieldEval f3 = new FieldEval("employee.id2", CatalogUtil.newSimpleDataType(Type.INT4));
      FieldEval f4 = new FieldEval("people.fid2", CatalogUtil.newSimpleDataType(Type.INT4));
  
      EvalNode joinQual = new BinaryEval(EvalType.EQUAL, f1, f2);
      SortSpec[][] sortSpecs = PlannerUtil.getSortKeysFromJoinQual(joinQual, outerSchema, innerSchema);
      assertEquals(2, sortSpecs.length);
      assertEquals(1, sortSpecs[0].length);
      assertEquals(1, sortSpecs[1].length);
      assertEquals(outerSchema.getColumn("id1"), sortSpecs[0][0].getSortKey());
      assertEquals(innerSchema.getColumn("fid1"), sortSpecs[1][0].getSortKey());
  
      // tests for composited join key
      EvalNode joinQual2 = new BinaryEval(EvalType.EQUAL, f3, f4);
      EvalNode compositedJoinQual = new BinaryEval(EvalType.AND, joinQual, joinQual2);
  
      sortSpecs = PlannerUtil.getSortKeysFromJoinQual(compositedJoinQual, outerSchema, innerSchema);
      assertEquals(2, sortSpecs.length);
      assertEquals(2, sortSpecs[0].length);
      assertEquals(2, sortSpecs[1].length);
      assertEquals(outerSchema.getColumn("id1"), sortSpecs[0][0].getSortKey());
      assertEquals(outerSchema.getColumn("id2"), sortSpecs[0][1].getSortKey());
      assertEquals(innerSchema.getColumn("fid1"), sortSpecs[1][0].getSortKey());
      assertEquals(innerSchema.getColumn("fid2"), sortSpecs[1][1].getSortKey());
    }
test_case.class_method_signature: TestPlannerUtil.testGetSortKeysFromJoinQual()
test_case.full_signature: @Test public final void testGetSortKeysFromJoinQual()
test_case.identifier: testGetSortKeysFromJoinQual
test_case.invocations: addColumn newSimpleDataType addColumn newSimpleDataType addColumn newSimpleDataType addColumn newSimpleDataType newSimpleDataType newSimpleDataType newSimpleDataType newSimpleDataType getSortKeysFromJoinQual assertEquals assertEquals assertEquals assertEquals getColumn getSortKey assertEquals getColumn getSortKey getSortKeysFromJoinQual assertEquals assertEquals assertEquals assertEquals getColumn getSortKey assertEquals getColumn getSortKey assertEquals getColumn getSortKey assertEquals getColumn getSortKey
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetSortKeysFromJoinQual()
focal_class.file: tajo-core/src/main/java/org/apache/tajo/engine/planner/PlannerUtil.java
focal_class.identifier: PlannerUtil
focal_class.class_method_signature: PlannerUtil.checkIfDDLPlan(LogicalNode node)
focal_class.full_signature: public static boolean checkIfDDLPlan(LogicalNode node)
focal_class.identifier: checkIfDDLPlan
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node)
focal_class.return: boolean
focal_class.signature: boolean checkIfDDLPlan(LogicalNode node)
focal_class.class_method_signature: PlannerUtil.checkIfSimpleQuery(LogicalPlan plan)
focal_class.full_signature: public static boolean checkIfSimpleQuery(LogicalPlan plan)
focal_class.identifier: checkIfSimpleQuery
focal_class.modifiers: public static
focal_class.parameters: (LogicalPlan plan)
focal_class.return: boolean
focal_class.signature: boolean checkIfSimpleQuery(LogicalPlan plan)
focal_class.class_method_signature: PlannerUtil.checkIfNonFromQuery(LogicalPlan plan)
focal_class.full_signature: public static boolean checkIfNonFromQuery(LogicalPlan plan)
focal_class.identifier: checkIfNonFromQuery
focal_class.modifiers: public static
focal_class.parameters: (LogicalPlan plan)
focal_class.return: boolean
focal_class.signature: boolean checkIfNonFromQuery(LogicalPlan plan)
focal_class.class_method_signature: PlannerUtil.getRelationLineage(LogicalNode from)
focal_class.full_signature: public static String[] getRelationLineage(LogicalNode from)
focal_class.identifier: getRelationLineage
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode from)
focal_class.return: String[]
focal_class.signature: String[] getRelationLineage(LogicalNode from)
focal_class.class_method_signature: PlannerUtil.getRelationLineageWithinQueryBlock(LogicalPlan plan, LogicalNode from)
focal_class.full_signature: public static Collection<String> getRelationLineageWithinQueryBlock(LogicalPlan plan, LogicalNode from)
focal_class.identifier: getRelationLineageWithinQueryBlock
focal_class.modifiers: public static
focal_class.parameters: (LogicalPlan plan, LogicalNode from)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> getRelationLineageWithinQueryBlock(LogicalPlan plan, LogicalNode from)
focal_class.class_method_signature: PlannerUtil.deleteNode(LogicalNode parent, LogicalNode tobeRemoved)
focal_class.full_signature: public static LogicalNode deleteNode(LogicalNode parent, LogicalNode tobeRemoved)
focal_class.identifier: deleteNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode parent, LogicalNode tobeRemoved)
focal_class.return: LogicalNode
focal_class.signature: LogicalNode deleteNode(LogicalNode parent, LogicalNode tobeRemoved)
focal_class.class_method_signature: PlannerUtil.replaceNode(LogicalPlan plan, LogicalNode startNode, LogicalNode oldNode, LogicalNode newNode)
focal_class.full_signature: public static void replaceNode(LogicalPlan plan, LogicalNode startNode, LogicalNode oldNode, LogicalNode newNode)
focal_class.identifier: replaceNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalPlan plan, LogicalNode startNode, LogicalNode oldNode, LogicalNode newNode)
focal_class.return: void
focal_class.signature: void replaceNode(LogicalPlan plan, LogicalNode startNode, LogicalNode oldNode, LogicalNode newNode)
focal_class.class_method_signature: PlannerUtil.replaceNode(LogicalNode plan, LogicalNode newNode, NodeType type)
focal_class.full_signature: public static void replaceNode(LogicalNode plan, LogicalNode newNode, NodeType type)
focal_class.identifier: replaceNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode plan, LogicalNode newNode, NodeType type)
focal_class.return: void
focal_class.signature: void replaceNode(LogicalNode plan, LogicalNode newNode, NodeType type)
focal_class.class_method_signature: PlannerUtil.findTopNode(LogicalNode node, NodeType type)
focal_class.full_signature: public static T findTopNode(LogicalNode node, NodeType type)
focal_class.identifier: findTopNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node, NodeType type)
focal_class.return: T
focal_class.signature: T findTopNode(LogicalNode node, NodeType type)
focal_class.class_method_signature: PlannerUtil.findMostBottomNode(LogicalNode node, NodeType type)
focal_class.full_signature: public static T findMostBottomNode(LogicalNode node, NodeType type)
focal_class.identifier: findMostBottomNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node, NodeType type)
focal_class.return: T
focal_class.signature: T findMostBottomNode(LogicalNode node, NodeType type)
focal_class.class_method_signature: PlannerUtil.findAllNodes(LogicalNode node, NodeType... type)
focal_class.full_signature: public static LogicalNode[] findAllNodes(LogicalNode node, NodeType... type)
focal_class.identifier: findAllNodes
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node, NodeType... type)
focal_class.return: LogicalNode[]
focal_class.signature: LogicalNode[] findAllNodes(LogicalNode node, NodeType... type)
focal_class.class_method_signature: PlannerUtil.findTopParentNode(LogicalNode node, NodeType type)
focal_class.full_signature: public static T findTopParentNode(LogicalNode node, NodeType type)
focal_class.identifier: findTopParentNode
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node, NodeType type)
focal_class.return: T
focal_class.signature: T findTopParentNode(LogicalNode node, NodeType type)
focal_class.class_method_signature: PlannerUtil.schemaToTargets(Schema schema, Target[] targets)
focal_class.full_signature: public static void schemaToTargets(Schema schema, Target[] targets)
focal_class.identifier: schemaToTargets
focal_class.modifiers: public static
focal_class.parameters: (Schema schema, Target[] targets)
focal_class.return: void
focal_class.signature: void schemaToTargets(Schema schema, Target[] targets)
focal_class.class_method_signature: PlannerUtil.schemaToTargets(Schema schema)
focal_class.full_signature: public static Target[] schemaToTargets(Schema schema)
focal_class.identifier: schemaToTargets
focal_class.modifiers: public static
focal_class.parameters: (Schema schema)
focal_class.return: Target[]
focal_class.signature: Target[] schemaToTargets(Schema schema)
focal_class.class_method_signature: PlannerUtil.schemaToTargetsWithGeneratedFields(Schema schema)
focal_class.full_signature: public static Target[] schemaToTargetsWithGeneratedFields(Schema schema)
focal_class.identifier: schemaToTargetsWithGeneratedFields
focal_class.modifiers: public static
focal_class.parameters: (Schema schema)
focal_class.return: Target[]
focal_class.signature: Target[] schemaToTargetsWithGeneratedFields(Schema schema)
focal_class.class_method_signature: PlannerUtil.schemaToSortSpecs(Schema schema)
focal_class.full_signature: public static SortSpec[] schemaToSortSpecs(Schema schema)
focal_class.identifier: schemaToSortSpecs
focal_class.modifiers: public static
focal_class.parameters: (Schema schema)
focal_class.return: SortSpec[]
focal_class.signature: SortSpec[] schemaToSortSpecs(Schema schema)
focal_class.class_method_signature: PlannerUtil.schemaToSortSpecs(Column[] columns)
focal_class.full_signature: public static SortSpec[] schemaToSortSpecs(Column[] columns)
focal_class.identifier: schemaToSortSpecs
focal_class.modifiers: public static
focal_class.parameters: (Column[] columns)
focal_class.return: SortSpec[]
focal_class.signature: SortSpec[] schemaToSortSpecs(Column[] columns)
focal_class.class_method_signature: PlannerUtil.columnsToSortSpec(Collection<Column> columns)
focal_class.full_signature: public static SortSpec[] columnsToSortSpec(Collection<Column> columns)
focal_class.identifier: columnsToSortSpec
focal_class.modifiers: public static
focal_class.parameters: (Collection<Column> columns)
focal_class.return: SortSpec[]
focal_class.signature: SortSpec[] columnsToSortSpec(Collection<Column> columns)
focal_class.class_method_signature: PlannerUtil.sortSpecsToSchema(SortSpec[] sortSpecs)
focal_class.full_signature: public static Schema sortSpecsToSchema(SortSpec[] sortSpecs)
focal_class.identifier: sortSpecsToSchema
focal_class.modifiers: public static
focal_class.parameters: (SortSpec[] sortSpecs)
focal_class.return: Schema
focal_class.signature: Schema sortSpecsToSchema(SortSpec[] sortSpecs)
focal_class.class_method_signature: PlannerUtil.getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)
focal_class.full_signature: public static SortSpec[][] getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)
focal_class.identifier: getSortKeysFromJoinQual
focal_class.modifiers: public static
focal_class.parameters: (EvalNode joinQual, Schema outer, Schema inner)
focal_class.return: SortSpec[][]
focal_class.signature: SortSpec[][] getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)
focal_class.class_method_signature: PlannerUtil.getComparatorsFromJoinQual(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.full_signature: public static TupleComparator[] getComparatorsFromJoinQual(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.identifier: getComparatorsFromJoinQual
focal_class.modifiers: public static
focal_class.parameters: (EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.return: TupleComparator[]
focal_class.signature: TupleComparator[] getComparatorsFromJoinQual(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.class_method_signature: PlannerUtil.joinJoinKeyForEachTable(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.full_signature: public static Column[][] joinJoinKeyForEachTable(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.identifier: joinJoinKeyForEachTable
focal_class.modifiers: public static
focal_class.parameters: (EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.return: Column[][]
focal_class.signature: Column[][] joinJoinKeyForEachTable(EvalNode joinQual, Schema leftSchema, Schema rightSchema)
focal_class.class_method_signature: PlannerUtil.getJoinKeyPairs(EvalNode joinQual, Schema leftSchema, Schema rightSchema,
                                                 boolean includeThetaJoin)
focal_class.full_signature: public static List<Column[]> getJoinKeyPairs(EvalNode joinQual, Schema leftSchema, Schema rightSchema,
                                                 boolean includeThetaJoin)
focal_class.identifier: getJoinKeyPairs
focal_class.modifiers: public static
focal_class.parameters: (EvalNode joinQual, Schema leftSchema, Schema rightSchema,
                                                 boolean includeThetaJoin)
focal_class.return: List<Column[]>
focal_class.signature: List<Column[]> getJoinKeyPairs(EvalNode joinQual, Schema leftSchema, Schema rightSchema,
                                                 boolean includeThetaJoin)
focal_class.class_method_signature: PlannerUtil.targetToSchema(Collection<Target> targets)
focal_class.full_signature: public static Schema targetToSchema(Collection<Target> targets)
focal_class.identifier: targetToSchema
focal_class.modifiers: public static
focal_class.parameters: (Collection<Target> targets)
focal_class.return: Schema
focal_class.signature: Schema targetToSchema(Collection<Target> targets)
focal_class.class_method_signature: PlannerUtil.targetToSchema(Target[] targets)
focal_class.full_signature: public static Schema targetToSchema(Target[] targets)
focal_class.identifier: targetToSchema
focal_class.modifiers: public static
focal_class.parameters: (Target[] targets)
focal_class.return: Schema
focal_class.signature: Schema targetToSchema(Target[] targets)
focal_class.class_method_signature: PlannerUtil.stripTarget(Target[] sourceTargets)
focal_class.full_signature: public static Target[] stripTarget(Target[] sourceTargets)
focal_class.identifier: stripTarget
focal_class.modifiers: public static
focal_class.parameters: (Target[] sourceTargets)
focal_class.return: Target[]
focal_class.signature: Target[] stripTarget(Target[] sourceTargets)
focal_class.class_method_signature: PlannerUtil.clone(LogicalPlan plan, LogicalNode node)
focal_class.full_signature: public static T clone(LogicalPlan plan, LogicalNode node)
focal_class.identifier: clone
focal_class.modifiers: public static
focal_class.parameters: (LogicalPlan plan, LogicalNode node)
focal_class.return: T
focal_class.signature: T clone(LogicalPlan plan, LogicalNode node)
focal_class.class_method_signature: PlannerUtil.isCommutativeJoin(JoinType joinType)
focal_class.full_signature: public static boolean isCommutativeJoin(JoinType joinType)
focal_class.identifier: isCommutativeJoin
focal_class.modifiers: public static
focal_class.parameters: (JoinType joinType)
focal_class.return: boolean
focal_class.signature: boolean isCommutativeJoin(JoinType joinType)
focal_class.class_method_signature: PlannerUtil.existsAggregationFunction(Expr expr)
focal_class.full_signature: public static boolean existsAggregationFunction(Expr expr)
focal_class.identifier: existsAggregationFunction
focal_class.modifiers: public static
focal_class.parameters: (Expr expr)
focal_class.return: boolean
focal_class.signature: boolean existsAggregationFunction(Expr expr)
focal_class.class_method_signature: PlannerUtil.existsDistinctAggregationFunction(Expr expr)
focal_class.full_signature: public static boolean existsDistinctAggregationFunction(Expr expr)
focal_class.identifier: existsDistinctAggregationFunction
focal_class.modifiers: public static
focal_class.parameters: (Expr expr)
focal_class.return: boolean
focal_class.signature: boolean existsDistinctAggregationFunction(Expr expr)
focal_class.class_method_signature: PlannerUtil.toQualifiedFieldNames(Collection<String> fieldNames, String qualifier)
focal_class.full_signature: public static Collection<String> toQualifiedFieldNames(Collection<String> fieldNames, String qualifier)
focal_class.identifier: toQualifiedFieldNames
focal_class.modifiers: public static
focal_class.parameters: (Collection<String> fieldNames, String qualifier)
focal_class.return: Collection<String>
focal_class.signature: Collection<String> toQualifiedFieldNames(Collection<String> fieldNames, String qualifier)
focal_class.class_method_signature: PlannerUtil.convertSortSpecs(Collection<CatalogProtos.SortSpecProto> sortSpecProtos)
focal_class.full_signature: public static SortSpec[] convertSortSpecs(Collection<CatalogProtos.SortSpecProto> sortSpecProtos)
focal_class.identifier: convertSortSpecs
focal_class.modifiers: public static
focal_class.parameters: (Collection<CatalogProtos.SortSpecProto> sortSpecProtos)
focal_class.return: SortSpec[]
focal_class.signature: SortSpec[] convertSortSpecs(Collection<CatalogProtos.SortSpecProto> sortSpecProtos)
focal_class.class_method_signature: PlannerUtil.buildExplainString(LogicalNode node)
focal_class.full_signature: public static String buildExplainString(LogicalNode node)
focal_class.identifier: buildExplainString
focal_class.modifiers: public static
focal_class.parameters: (LogicalNode node)
focal_class.return: String
focal_class.signature: String buildExplainString(LogicalNode node)
focal_method.body: public static SortSpec[][] getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner) {
      // It is used for the merge join executor. The merge join only considers the equi-join.
      // So, theta-join flag must be false.
      List<Column[]> joinKeyPairs = getJoinKeyPairs(joinQual, outer, inner, false);
      SortSpec[] outerSortSpec = new SortSpec[joinKeyPairs.size()];
      SortSpec[] innerSortSpec = new SortSpec[joinKeyPairs.size()];
  
      for (int i = 0; i < joinKeyPairs.size(); i++) {
        outerSortSpec[i] = new SortSpec(joinKeyPairs.get(i)[0]);
        innerSortSpec[i] = new SortSpec(joinKeyPairs.get(i)[1]);
      }
  
      return new SortSpec[][]{outerSortSpec, innerSortSpec};
    }
focal_method.class_method_signature: PlannerUtil.getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)
focal_method.full_signature: public static SortSpec[][] getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)
focal_method.identifier: getSortKeysFromJoinQual
focal_method.invocations: getJoinKeyPairs size size size get get
focal_method.modifiers: public static
focal_method.parameters: (EvalNode joinQual, Schema outer, Schema inner)
focal_method.return: SortSpec[][]
focal_method.signature: SortSpec[][] getSortKeysFromJoinQual(EvalNode joinQual, Schema outer, Schema inner)