Skip to content

Commit

Permalink
HIVE-10341 : CBO (Calcite Return Path): TraitSets not correctly propa…
Browse files Browse the repository at this point in the history
…gated in HiveSortExchange causes Assertion error (Jesus Camacho Rodriguez via Ashutosh Chauhan)

git-svn-id: https://svn.apache.org/repos/asf/hive/branches/cbo@1673837 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ashutoshc committed Apr 15, 2015
1 parent 58a8731 commit 6bf6bbe
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -33,9 +32,8 @@ public static HiveSortExchange create(RelNode input,
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);
}

Expand Down

0 comments on commit 6bf6bbe

Please sign in to comment.