vvysotskyi commented on a change in pull request #1810: DRILL-7271: Refactor Metadata interfaces and classes to contain all needed information for the File based Metastore URL: https://github.com/apache/drill/pull/1810#discussion_r296245208
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetReaderUtility.java ########## @@ -594,50 +594,66 @@ public static long getDateTimeValueFromBinary(Binary binaryTimeStampValue, boole * @return major type */ public static TypeProtos.MajorType getType(PrimitiveTypeName type, OriginalType originalType, int scale, int precision) { + TypeProtos.MinorType minorType = getMinorType(type, originalType); + if (originalType == OriginalType.DECIMAL) { + return Types.withScaleAndPrecision(minorType, TypeProtos.DataMode.OPTIONAL, scale, precision); + } + + return Types.optional(minorType); + } + + /** + * Builds minor type using given {@code OriginalType originalType} or {@code PrimitiveTypeName type}. + * + * @param type parquet primitive type + * @param originalType parquet original type + * @return major type Review comment: Thanks, done. ---------------------------------------------------------------- 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