You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2018/07/18 15:54:32 UTC

[GitHub] KazydubB commented on a change in pull request #1386: DRILL-6574: Add option to push LIMIT(0) on top of SCAN (late limit 0 optimization)

KazydubB commented on a change in pull request #1386: DRILL-6574: Add option to push LIMIT(0) on top of SCAN (late limit 0 optimization)
URL: https://github.com/apache/drill/pull/1386#discussion_r203434125
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/handlers/FindLimit0Visitor.java
 ##########
 @@ -126,9 +161,84 @@ public static boolean containsLimit0(final RelNode rel) {
     return visitor.isContains();
   }
 
-  private boolean contains = false;
+  /**
+   * TODO(DRILL-3993): Use RelBuilder to create a limit node to allow for applying this optimization in potentially
+   * any of the transformations, but currently this can be applied after Drill logical transformation, and before
+   * Drill physical transformation.
+   */
+  public static DrillRel addLimitOnTopOfLeafNodes(final DrillRel rel) {
+    final Pointer<Boolean> isUnsupported = new Pointer<>(false);
 
 Review comment:
   Because the variable is re-assigned and is used in anonymous classes (unsupportedFunctionsVisitor, unsupportedOperationsVisitor variables) and should be (effectively) final.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services