soumyakanti3578 commented on a change in pull request #1959:
URL: https://github.com/apache/hive/pull/1959#discussion_r572930028



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveDruidRules.java
##########
@@ -59,40 +54,35 @@
  */
 public class HiveDruidRules {
 
-  public static final DruidFilterRule FILTER = new 
DruidFilterRule(HiveRelFactories.HIVE_BUILDER);
+  public static final DruidFilterRule FILTER = (DruidFilterRule) 
DruidFilterRule.Config.EMPTY
+          .withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();
 
-  public static final DruidProjectRule PROJECT = new 
DruidProjectRule(HiveRelFactories.HIVE_BUILDER);
+  public static final DruidProjectRule PROJECT = (DruidProjectRule) 
DruidProjectRule.Config.EMPTY
+          .withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();
 
-  public static final DruidAggregateRule AGGREGATE = new 
DruidAggregateRule(HiveRelFactories.HIVE_BUILDER);
+  public static final DruidAggregateRule AGGREGATE = (DruidAggregateRule) 
DruidAggregateRule.Config.EMPTY
+          .withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();
 
   public static final DruidAggregateProjectRule AGGREGATE_PROJECT =
-      new DruidAggregateProjectRule(HiveRelFactories.HIVE_BUILDER);
+          (DruidAggregateProjectRule) DruidAggregateProjectRule.Config.EMPTY.
+                  
withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();
 
-  public static final DruidSortRule SORT = new 
DruidSortRule(HiveRelFactories.HIVE_BUILDER);
+  public static final DruidSortRule SORT = (DruidSortRule) 
DruidSortRule.Config.EMPTY
+          .withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();
 
-  public static final DruidSortProjectTransposeRule SORT_PROJECT_TRANSPOSE =
-      new DruidSortProjectTransposeRule(HiveRelFactories.HIVE_BUILDER);
+  public static final SortProjectTransposeRule SORT_PROJECT_TRANSPOSE = 
DruidRules.SORT_PROJECT_TRANSPOSE;

Review comment:
       Oh yes, so I think I should update it like this?
   `public static final SortProjectTransposeRule SORT_PROJECT_TRANSPOSE = 
       (SortProjectTransposeRule) 
DruidRules.SORT_PROJECT_TRANSPOSE.config.withRelBuilderFactory(HiveRelFactories.HIVE_BUILDER).toRule();`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to