Github user gparai commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1096#discussion_r171708410
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/common/DrillRelOptUtil.java
 ---
    @@ -224,4 +226,64 @@ public Void visitInputRef(RexInputRef inputRef) {
         }
       }
     
    +  public static boolean isLimit0(RexNode fetch) {
    +    if (fetch != null && fetch.isA(SqlKind.LITERAL)) {
    +      RexLiteral l = (RexLiteral) fetch;
    +      switch (l.getTypeName()) {
    +        case BIGINT:
    +        case INTEGER:
    +        case DECIMAL:
    +          if (((long) l.getValue2()) == 0) {
    +            return true;
    +          }
    +      }
    +    }
    +    return false;
    +  }
    +
    +  public static boolean isProjectOutputRowcountUnknown(RelNode project) {
    --- End diff --
    
    Done


---

Reply via email to