diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveSubQRemoveRelBuilder.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveSubQRemoveRelBuilder.java index e4f3057..e280bba 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveSubQRemoveRelBuilder.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/HiveSubQRemoveRelBuilder.java @@ -143,36 +143,26 @@ public HiveSubQRemoveRelBuilder(Context context, RelOptCluster cluster, if (context == null) { context = Contexts.EMPTY_CONTEXT; } - this.aggregateFactory = - Util.first(context.unwrap(RelFactories.AggregateFactory.class), - RelFactories.DEFAULT_AGGREGATE_FACTORY); - this.filterFactory = - Util.first(context.unwrap(RelFactories.FilterFactory.class), - HiveRelFactories.HIVE_FILTER_FACTORY); - this.projectFactory = - Util.first(context.unwrap(RelFactories.ProjectFactory.class), - RelFactories.DEFAULT_PROJECT_FACTORY); - this.sortFactory = - Util.first(context.unwrap(RelFactories.SortFactory.class), - RelFactories.DEFAULT_SORT_FACTORY); - this.setOpFactory = - Util.first(context.unwrap(RelFactories.SetOpFactory.class), - RelFactories.DEFAULT_SET_OP_FACTORY); - this.joinFactory = - Util.first(context.unwrap(RelFactories.JoinFactory.class), - RelFactories.DEFAULT_JOIN_FACTORY); - this.semiJoinFactory = - Util.first(context.unwrap(RelFactories.SemiJoinFactory.class), - RelFactories.DEFAULT_SEMI_JOIN_FACTORY); - this.correlateFactory = - Util.first(context.unwrap(RelFactories.CorrelateFactory.class), - RelFactories.DEFAULT_CORRELATE_FACTORY); - this.valuesFactory = - Util.first(context.unwrap(RelFactories.ValuesFactory.class), - RelFactories.DEFAULT_VALUES_FACTORY); - this.scanFactory = - Util.first(context.unwrap(RelFactories.TableScanFactory.class), - RelFactories.DEFAULT_TABLE_SCAN_FACTORY); + this.aggregateFactory = Util.first(context.unwrap(RelFactories.AggregateFactory.class), + HiveRelFactories.HIVE_AGGREGATE_FACTORY); + this.filterFactory = Util.first(context.unwrap(RelFactories.FilterFactory.class), + HiveRelFactories.HIVE_FILTER_FACTORY); + this.projectFactory = Util.first(context.unwrap(RelFactories.ProjectFactory.class), + HiveRelFactories.HIVE_PROJECT_FACTORY); + this.sortFactory = Util.first(context.unwrap(RelFactories.SortFactory.class), + HiveRelFactories.HIVE_SORT_FACTORY); + this.setOpFactory = Util.first(context.unwrap(RelFactories.SetOpFactory.class), + HiveRelFactories.HIVE_SET_OP_FACTORY); + this.joinFactory = Util.first(context.unwrap(RelFactories.JoinFactory.class), + HiveRelFactories.HIVE_JOIN_FACTORY); + this.semiJoinFactory = Util.first(context.unwrap(RelFactories.SemiJoinFactory.class), + HiveRelFactories.HIVE_SEMI_JOIN_FACTORY); + this.correlateFactory = Util.first(context.unwrap(RelFactories.CorrelateFactory.class), + RelFactories.DEFAULT_CORRELATE_FACTORY); + this.valuesFactory = Util.first(context.unwrap(RelFactories.ValuesFactory.class), + RelFactories.DEFAULT_VALUES_FACTORY); + this.scanFactory = Util.first(context.unwrap(RelFactories.TableScanFactory.class), + RelFactories.DEFAULT_TABLE_SCAN_FACTORY); } /** Creates a RelBuilder. */