hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1673837 - /hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java
Date Wed, 15 Apr 2015 15:52:57 GMT
Author: hashutosh
Date: Wed Apr 15 15:52:57 2015
New Revision: 1673837

URL: http://svn.apache.org/r1673837
Log:
HIVE-10341 : CBO (Calcite Return Path): TraitSets not correctly propagated in HiveSortExchange
causes Assertion error (Jesus Camacho Rodriguez via Ashutosh Chauhan)

Modified:
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java

Modified: hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java?rev=1673837&r1=1673836&r2=1673837&view=diff
==============================================================================
--- hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java
(original)
+++ hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveSortExchange.java
Wed Apr 15 15:52:57 2015
@@ -1,6 +1,5 @@
 package org.apache.hadoop.hive.ql.optimizer.calcite.reloperators;
 
-import org.apache.calcite.plan.Convention;
 import org.apache.calcite.plan.RelOptCluster;
 import org.apache.calcite.plan.RelTraitSet;
 import org.apache.calcite.rel.RelCollation;
@@ -33,9 +32,8 @@ public class HiveSortExchange extends So
       RelDistribution distribution, RelCollation collation) {
     RelOptCluster cluster = input.getCluster();
     distribution = RelDistributionTraitDef.INSTANCE.canonize(distribution);
-    RelTraitSet traitSet =
-        input.getTraitSet().replace(Convention.NONE).replace(distribution);
     collation = RelCollationTraitDef.INSTANCE.canonize(collation);
+    RelTraitSet traitSet = RelTraitSet.createEmpty().plus(distribution).plus(collation);
     return new HiveSortExchange(cluster, traitSet, input, distribution, collation);
   }
 



Mime
View raw message