> On Oct. 21, 2016, 2:23 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveIntersectMergeRule.java, > > line 42 > > <https://reviews.apache.org/r/51755/diff/6/?file=1542500#file1542500line42> > > > > It seems this rule is not called from anywhere. Does that mean we will > > generate suboptimal plans where it was applicable now?
it is called in Calcite planner {code} perfLogger.PerfLogBegin(this.getClass().getName(), PerfLogger.OPTIMIZER); basePlan = hepPlan(basePlan, true, mdProvider, null, HepMatchOrder.BOTTOM_UP, HiveProjectOverIntersectRemoveRule.INSTANCE, HiveIntersectMergeRule.INSTANCE); perfLogger.PerfLogEnd(this.getClass().getName(), PerfLogger.OPTIMIZER, "Calcite: HiveIntersectMerge rule");{code} > On Oct. 21, 2016, 2:23 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveProjectOverIntersectRemoveRule.java, > > line 52 > > <https://reviews.apache.org/r/51755/diff/6/?file=1542502#file1542502line52> > > > > I presume you want if() here instead of assert. I think assert is better. it will throw out error if it is not trivial. This rule should only match for the () for the intersect. > On Oct. 21, 2016, 2:23 p.m., Ashutosh Chauhan wrote: > > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java, line 1196 > > <https://reviews.apache.org/r/51755/diff/6/?file=1542505#file1542505line1196> > > > > No intersect-merge rule? there is. - pengcheng ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51755/#review153543 ----------------------------------------------------------- On Oct. 20, 2016, 6:12 p.m., pengcheng xiong wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51755/ > ----------------------------------------------------------- > > (Updated Oct. 20, 2016, 6:12 p.m.) > > > Review request for hive and Ashutosh Chauhan. > > > Repository: hive-git > > > Description > ------- > > HIVE-12765 > > > Diffs > ----- > > itests/src/test/resources/testconfiguration.properties 09833ff > ql/src/java/org/apache/hadoop/hive/ql/ErrorMsg.java f308832 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveCalciteUtil.java > c527e58 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveRelFactories.java > cf93ed8 > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveExcept.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveIntersect.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveExceptRewriteRule.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveIntersectMergeRule.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveIntersectRewriteRule.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveProjectOverIntersectRemoveRule.java > PRE-CREATION > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSortLimitPullUpConstantsRule.java > 3ec9dac > > ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/translator/ASTConverter.java > 63aa086 > ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java d32a0a7 > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g 5d3fa6a > ql/src/java/org/apache/hadoop/hive/ql/parse/HiveParser.g 5c16c55 > ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g 50987c3 > ql/src/java/org/apache/hadoop/hive/ql/parse/QBExpr.java cccf0f6 > ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java 9d58193 > > ql/src/test/org/apache/hadoop/hive/ql/parse/TestSQL11ReservedKeyWordsNegative.java > a427803 > ql/src/test/queries/clientpositive/except_all.q PRE-CREATION > ql/src/test/queries/clientpositive/except_distinct.q PRE-CREATION > ql/src/test/queries/clientpositive/intersect_all.q PRE-CREATION > ql/src/test/queries/clientpositive/intersect_distinct.q PRE-CREATION > ql/src/test/queries/clientpositive/intersect_merge.q PRE-CREATION > ql/src/test/results/clientpositive/except_all.q.out PRE-CREATION > ql/src/test/results/clientpositive/llap/except_distinct.q.out PRE-CREATION > ql/src/test/results/clientpositive/llap/intersect_all.q.out PRE-CREATION > ql/src/test/results/clientpositive/llap/intersect_distinct.q.out > PRE-CREATION > ql/src/test/results/clientpositive/llap/intersect_merge.q.out PRE-CREATION > > Diff: https://reviews.apache.org/r/51755/diff/ > > > Testing > ------- > > > Thanks, > > pengcheng xiong > >