Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/819#discussion_r113605844
--- Diff: common/src/main/java/org/apache/drill/common/types/Types.java ---
@@ -340,18 +344,18 @@ public static int getJdbcDisplaySize(MajorType type) {
case INTERVALYEAR:
return precision > 0
? 5 + precision // P..Y12M
- : 0; // if precision is not set, return 0 because there's not
enough info
+ : UNDEFINED; // if precision is not set, return 0 because
there's not enough info
case INTERVALDAY:
return precision > 0
? 12 + precision // P..DT12H60M60S assuming fractional seconds
precision is not supported
- : 0; // if precision is not set, return 0 because there's not
enough info
+ : UNDEFINED; // if precision is not set, return 0 because
there's not enough info
case INTERVAL:
case MAP:
case LATE:
case NULL:
- case UNION: return 0;
+ case UNION: return UNDEFINED;
--- End diff --
If we know the set of vectors in the union, then the display width is the
maximum of the widths of those types.
---
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.
---