ygerzhedovich commented on a change in pull request #9070:
URL: https://github.com/apache/ignite/pull/9070#discussion_r639575219



##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
##########
@@ -77,7 +79,14 @@
             // so it's better to disable such rewriting right now
             // TODO: remove this after IGNITE-14277
             .withInSubQueryThreshold(Integer.MAX_VALUE)
-            .withDecorrelationEnabled(true))
+            .withDecorrelationEnabled(true)
+            .withHintStrategyTable(
+                HintStrategyTable.builder()
+                    .hintStrategy("DISABLE_RULE", (hint, rel) -> true)
+                    .hintStrategy("EXPAND_DISTINCT_AGG", (hint, rel) -> rel 
instanceof Aggregate)

Review comment:
       maybe better extract names of hint strategies to separate place.

##########
File path: 
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/CalciteQueryProcessor.java
##########
@@ -77,7 +79,14 @@
             // so it's better to disable such rewriting right now
             // TODO: remove this after IGNITE-14277
             .withInSubQueryThreshold(Integer.MAX_VALUE)
-            .withDecorrelationEnabled(true))
+            .withDecorrelationEnabled(true)
+            .withHintStrategyTable(
+                HintStrategyTable.builder()
+                    .hintStrategy("DISABLE_RULE", (hint, rel) -> true)
+                    .hintStrategy("EXPAND_DISTINCT_AGG", (hint, rel) -> rel 
instanceof Aggregate)

Review comment:
       maybe better to extract names of hint strategies to separate place.




-- 
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]


Reply via email to