test_class.declarator: util
test_class.modifier: static
test_class.original_string: static TajoTestingCluster util;
test_class.type: TajoTestingCluster
test_class.var_name: util
test_class.declarator: catalog = null
test_class.modifier: static
test_class.original_string: static CatalogService catalog = null;
test_class.type: CatalogService
test_class.var_name: catalog
test_class.declarator: expr1
test_class.modifier: static
test_class.original_string: static EvalNode expr1;
test_class.type: EvalNode
test_class.var_name: expr1
test_class.declarator: expr2
test_class.modifier: static
test_class.original_string: static EvalNode expr2;
test_class.type: EvalNode
test_class.var_name: expr2
test_class.declarator: expr3
test_class.modifier: static
test_class.original_string: static EvalNode expr3;
test_class.type: EvalNode
test_class.var_name: expr3
test_class.declarator: analyzer
test_class.modifier: static
test_class.original_string: static SQLAnalyzer analyzer;
test_class.type: SQLAnalyzer
test_class.var_name: analyzer
test_class.declarator: planner
test_class.modifier: static
test_class.original_string: static LogicalPlanner planner;
test_class.type: LogicalPlanner
test_class.var_name: planner
test_class.declarator: session = LocalTajoTestingUtility.createDummySession()
test_class.modifier: static
test_class.original_string: static Session session = LocalTajoTestingUtility.createDummySession();
test_class.type: Session
test_class.var_name: session
test_class.declarator: QUERIES = {
      "select 3 + 4 as plus, (3.5 * 2) as mul", // 0
      "select (score + 3) < 4, age > 5 from people", // 1
      "select score from people where score > 7", // 2
      "select score from people where (10 * 2) * (score + 2) > 20 + 30 + 10", // 3
      "select score from people where 10 * 2 > score * 10", // 4
      "select score from people where score < 10 and 4 < score", // 5
      "select score from people where score < 10 and 4 < score and age > 5", // 6
      "select score from people where (score > 1 and score < 3) or (7 < score and score < 10)", // 7
    }
test_class.modifier: public static final
test_class.original_string: public static final String [] QUERIES = {
      "select 3 + 4 as plus, (3.5 * 2) as mul", // 0
      "select (score + 3) < 4, age > 5 from people", // 1
      "select score from people where score > 7", // 2
      "select score from people where (10 * 2) * (score + 2) > 20 + 30 + 10", // 3
      "select score from people where 10 * 2 > score * 10", // 4
      "select score from people where score < 10 and 4 < score", // 5
      "select score from people where score < 10 and 4 < score and age > 5", // 6
      "select score from people where (score > 1 and score < 3) or (7 < score and score < 10)", // 7
    };
test_class.type: String []
test_class.var_name: QUERIES
test_class.file: tajo-core/src/test/java/org/apache/tajo/engine/eval/TestEvalTreeUtil.java
test_class.identifier: TestEvalTreeUtil
test_case.body: @Test
    public final void testFindDistinctAggFunctions() throws PlanningException {
      String query = "select sum(score) + max(age) from people";
      Expr expr = analyzer.parse(query);
      LogicalPlan plan = planner.createPlan(session, expr);
      GroupbyNode groupByNode = plan.getRootBlock().getNode(NodeType.GROUP_BY);
      EvalNode [] aggEvals = groupByNode.getAggFunctions();
  
      List<AggregationFunctionCallEval> list = new ArrayList<AggregationFunctionCallEval>();
      for (int i = 0; i < aggEvals.length; i++) {
        list.addAll(EvalTreeUtil.findDistinctAggFunction(aggEvals[i]));
      }
      assertEquals(2, list.size());
  
      Set<String> result = Sets.newHashSet("max", "sum");
      for (AggregationFunctionCallEval eval : list) {
        assertTrue(result.contains(eval.getName()));
      }
    }
test_case.class_method_signature: TestEvalTreeUtil.testFindDistinctAggFunctions()
test_case.full_signature: @Test public final void testFindDistinctAggFunctions()
test_case.identifier: testFindDistinctAggFunctions
test_case.invocations: parse createPlan getNode getRootBlock getAggFunctions addAll findDistinctAggFunction assertEquals size newHashSet assertTrue contains getName
test_case.modifiers: @Test public final
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFindDistinctAggFunctions()
focal_class.file: tajo-core/src/main/java/org/apache/tajo/engine/eval/EvalTreeUtil.java
focal_class.identifier: EvalTreeUtil
focal_class.class_method_signature: EvalTreeUtil.changeColumnRef(EvalNode node, String oldName, String newName)
focal_class.full_signature: public static void changeColumnRef(EvalNode node, String oldName, String newName)
focal_class.identifier: changeColumnRef
focal_class.modifiers: public static
focal_class.parameters: (EvalNode node, String oldName, String newName)
focal_class.return: void
focal_class.signature: void changeColumnRef(EvalNode node, String oldName, String newName)
focal_class.class_method_signature: EvalTreeUtil.replace(EvalNode expr, EvalNode targetExpr, EvalNode tobeReplaced)
focal_class.full_signature: public static void replace(EvalNode expr, EvalNode targetExpr, EvalNode tobeReplaced)
focal_class.identifier: replace
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr, EvalNode targetExpr, EvalNode tobeReplaced)
focal_class.return: void
focal_class.signature: void replace(EvalNode expr, EvalNode targetExpr, EvalNode tobeReplaced)
focal_class.class_method_signature: EvalTreeUtil.findUniqueColumns(EvalNode node)
focal_class.full_signature: public static LinkedHashSet<Column> findUniqueColumns(EvalNode node)
focal_class.identifier: findUniqueColumns
focal_class.modifiers: public static
focal_class.parameters: (EvalNode node)
focal_class.return: LinkedHashSet<Column>
focal_class.signature: LinkedHashSet<Column> findUniqueColumns(EvalNode node)
focal_class.class_method_signature: EvalTreeUtil.findAllColumnRefs(EvalNode node)
focal_class.full_signature: public static List<Column> findAllColumnRefs(EvalNode node)
focal_class.identifier: findAllColumnRefs
focal_class.modifiers: public static
focal_class.parameters: (EvalNode node)
focal_class.return: List<Column>
focal_class.signature: List<Column> findAllColumnRefs(EvalNode node)
focal_class.class_method_signature: EvalTreeUtil.getSchemaByTargets(Schema inputSchema, Target [] targets)
focal_class.full_signature: public static Schema getSchemaByTargets(Schema inputSchema, Target [] targets)
focal_class.identifier: getSchemaByTargets
focal_class.modifiers: public static
focal_class.parameters: (Schema inputSchema, Target [] targets)
focal_class.return: Schema
focal_class.signature: Schema getSchemaByTargets(Schema inputSchema, Target [] targets)
focal_class.class_method_signature: EvalTreeUtil.getDomainByExpr(Schema inputSchema, EvalNode expr)
focal_class.full_signature: public static DataType getDomainByExpr(Schema inputSchema, EvalNode expr)
focal_class.identifier: getDomainByExpr
focal_class.modifiers: public static
focal_class.parameters: (Schema inputSchema, EvalNode expr)
focal_class.return: DataType
focal_class.signature: DataType getDomainByExpr(Schema inputSchema, EvalNode expr)
focal_class.class_method_signature: EvalTreeUtil.getContainExpr(EvalNode expr, Column target)
focal_class.full_signature: public static Collection<EvalNode> getContainExpr(EvalNode expr, Column target)
focal_class.identifier: getContainExpr
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr, Column target)
focal_class.return: Collection<EvalNode>
focal_class.signature: Collection<EvalNode> getContainExpr(EvalNode expr, Column target)
focal_class.class_method_signature: EvalTreeUtil.getExprCounters(EvalNode expr)
focal_class.full_signature: public static Map<EvalType, Integer> getExprCounters(EvalNode expr)
focal_class.identifier: getExprCounters
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr)
focal_class.return: Map<EvalType, Integer>
focal_class.signature: Map<EvalType, Integer> getExprCounters(EvalNode expr)
focal_class.class_method_signature: EvalTreeUtil.getContainExpr(EvalNode expr, Column target, Set<EvalNode> exprSet)
focal_class.full_signature: private static void getContainExpr(EvalNode expr, Column target, Set<EvalNode> exprSet)
focal_class.identifier: getContainExpr
focal_class.modifiers: private static
focal_class.parameters: (EvalNode expr, Column target, Set<EvalNode> exprSet)
focal_class.return: void
focal_class.signature: void getContainExpr(EvalNode expr, Column target, Set<EvalNode> exprSet)
focal_class.class_method_signature: EvalTreeUtil.containColumnRef(EvalNode expr, Column target)
focal_class.full_signature: public static boolean containColumnRef(EvalNode expr, Column target)
focal_class.identifier: containColumnRef
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr, Column target)
focal_class.return: boolean
focal_class.signature: boolean containColumnRef(EvalNode expr, Column target)
focal_class.class_method_signature: EvalTreeUtil._containColumnRef(EvalNode expr, Column target, 
        Set<EvalNode> exprSet)
focal_class.full_signature: private static void _containColumnRef(EvalNode expr, Column target, 
        Set<EvalNode> exprSet)
focal_class.identifier: _containColumnRef
focal_class.modifiers: private static
focal_class.parameters: (EvalNode expr, Column target, 
        Set<EvalNode> exprSet)
focal_class.return: void
focal_class.signature: void _containColumnRef(EvalNode expr, Column target, 
        Set<EvalNode> exprSet)
focal_class.class_method_signature: EvalTreeUtil.isJoinQual(EvalNode expr, boolean includeThetaJoin)
focal_class.full_signature: public static boolean isJoinQual(EvalNode expr, boolean includeThetaJoin)
focal_class.identifier: isJoinQual
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr, boolean includeThetaJoin)
focal_class.return: boolean
focal_class.signature: boolean isJoinQual(EvalNode expr, boolean includeThetaJoin)
focal_class.class_method_signature: EvalTreeUtil.findDistinctAggFunction(EvalNode expr)
focal_class.full_signature: public static Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr)
focal_class.identifier: findDistinctAggFunction
focal_class.modifiers: public static
focal_class.parameters: (EvalNode expr)
focal_class.return: Set<AggregationFunctionCallEval>
focal_class.signature: Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr)
focal_class.class_method_signature: EvalTreeUtil.findEvalsByType(EvalNode evalNode, EvalType type)
focal_class.full_signature: public static Collection<T> findEvalsByType(EvalNode evalNode, EvalType type)
focal_class.identifier: findEvalsByType
focal_class.modifiers: public static
focal_class.parameters: (EvalNode evalNode, EvalType type)
focal_class.return: Collection<T>
focal_class.signature: Collection<T> findEvalsByType(EvalNode evalNode, EvalType type)
focal_class.class_method_signature: EvalTreeUtil.checkIfCanBeConstant(EvalNode evalNode)
focal_class.full_signature: public static boolean checkIfCanBeConstant(EvalNode evalNode)
focal_class.identifier: checkIfCanBeConstant
focal_class.modifiers: public static
focal_class.parameters: (EvalNode evalNode)
focal_class.return: boolean
focal_class.signature: boolean checkIfCanBeConstant(EvalNode evalNode)
focal_class.class_method_signature: EvalTreeUtil.evaluateImmediately(EvalNode evalNode)
focal_class.full_signature: public static Datum evaluateImmediately(EvalNode evalNode)
focal_class.identifier: evaluateImmediately
focal_class.modifiers: public static
focal_class.parameters: (EvalNode evalNode)
focal_class.return: Datum
focal_class.signature: Datum evaluateImmediately(EvalNode evalNode)
focal_method.body: public static Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr) {
      AllAggFunctionFinder finder = new AllAggFunctionFinder();
      expr.postOrder(finder);
      return finder.getAggregationFunction();
    }
focal_method.class_method_signature: EvalTreeUtil.findDistinctAggFunction(EvalNode expr)
focal_method.full_signature: public static Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr)
focal_method.identifier: findDistinctAggFunction
focal_method.invocations: postOrder getAggregationFunction
focal_method.modifiers: public static
focal_method.parameters: (EvalNode expr)
focal_method.return: Set<AggregationFunctionCallEval>
focal_method.signature: Set<AggregationFunctionCallEval> findDistinctAggFunction(EvalNode expr)