vvysotskyi commented on a change in pull request #1945: DRILL-7502: Invalid codegen for typeof() with UNION URL: https://github.com/apache/drill/pull/1945#discussion_r363435140
########## File path: common/src/main/java/org/apache/drill/common/types/Types.java ########## @@ -906,4 +908,16 @@ public static boolean isNullable(final MajorType type) { throw new UnsupportedOperationException("Unexpected/unhandled DataMode value " + type.getMode()); } } + + /** + * The number of minor types. Actually, the largest minor type ordinal. + * (There are holes in the ordering.) Update this if a new type + * is added. Use this value when allocating arrays to be indexed + * by minor type. + * + * @return the maximum minor type ordinal + */ + public static final int typeCount() { Review comment: Thank you for finding and fixing all these issues! union data type was broken for a long time, and it is great that you will fix these code-gen issues. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services