Github user arina-ielchiieva commented on a diff in the pull request:
https://github.com/apache/drill/pull/819#discussion_r113915317
--- 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 --
4. Expanded reply in previous comment.
---
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.
---