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

    https://github.com/apache/drill/pull/819#discussion_r113801030
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillOptiq.java
 ---
    @@ -599,10 +598,28 @@ public LogicalExpression visitLiteral(RexLiteral 
literal) {
             throw new UnsupportedOperationException(String.format("Unable to 
convert the value of %s and type %s to a Drill constant expression.", literal, 
literal.getType().getSqlTypeName()));
           }
         }
    -  }
     
    -  private static final TypedNullConstant createNullExpr(MinorType type) {
    -    return new TypedNullConstant(Types.optional(type));
    +    /**
    +     * Create nullable major type using given minor type
    +     * and wraps it in typed null constant.
    +     *
    +     * @param type minor type
    +     * @return typed null constant instance
    +     */
    +    private TypedNullConstant createNullExpr(MinorType type) {
    +      return new TypedNullConstant(Types.optional(type));
    +    }
    +
    +    /**
    +     * Create nullable varchar major type with given precision
    +     * and wraps it in typed null constant.
    +     *
    +     * @param precision precision value
    +     * @return typed null constant instance
    +     */
    +    private TypedNullConstant createStringNullExpr(int precision) {
    +      return new TypedNullConstant(Types.withPrecision(MinorType.VARCHAR, 
TypeProtos.DataMode.OPTIONAL, precision));
    --- End diff --
    
    What's the length for "NULL" varchar constant? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to