Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
cbo-branch
-
None
Description
When return path is on (hive.cbo.returnpath.hiveop=true), the TraitSets are not correctly set up by HiveSortExchange. For instance, correlationoptimizer14.q produces the following exception:
Unexpected exception java.lang.AssertionError: traits=NONE.[], collation=[0] at org.apache.calcite.rel.core.SortExchange.<init>(SortExchange.java:63) at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveSortExchange.<init>(HiveSortExchange.java:18) at org.apache.hadoop.hive.ql.optimizer.calcite.reloperators.HiveSortExchange.create(HiveSortExchange.java:39) at org.apache.hadoop.hive.ql.optimizer.calcite.rules.HiveInsertExchange4JoinRule.onMatch(HiveInsertExchange4JoinRule.java:95) at org.apache.calcite.plan.AbstractRelOptPlanner.fireRule(AbstractRelOptPlanner.java:326) at org.apache.calcite.plan.hep.HepPlanner.applyRule(HepPlanner.java:515) at org.apache.calcite.plan.hep.HepPlanner.applyRules(HepPlanner.java:392) at org.apache.calcite.plan.hep.HepPlanner.executeInstruction(HepPlanner.java:255) at org.apache.calcite.plan.hep.HepInstruction$RuleInstance.execute(HepInstruction.java:125) at org.apache.calcite.plan.hep.HepPlanner.executeProgram(HepPlanner.java:207) at org.apache.calcite.plan.hep.HepPlanner.findBestExp(HepPlanner.java:194) ...