KurtYoung commented on a change in pull request #8435: 
[FLINK-12443][table-planner-blink] Replace InternalType with LogicalType in 
blink
URL: https://github.com/apache/flink/pull/8435#discussion_r285497543
 
 

 ##########
 File path: 
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/dataformat/BinaryRow.java
 ##########
 @@ -94,16 +69,32 @@ public static int calculateFixPartSizeInBytes(int arity) {
         * If it is a fixed-length field, we can call this BinaryRow's setXX 
method for in-place updates.
         * If it is variable-length field, can't use this method, because the 
underlying data is stored continuously.
         */
-       public static boolean isInFixedLengthPart(InternalType type) {
+       public static boolean isInFixedLengthPart(LogicalType type) {
                if (type instanceof DecimalType) {
-                       return ((DecimalType) type).precision() <= 
DecimalType.MAX_COMPACT_PRECISION;
+                       return ((DecimalType) type).getPrecision() <= 
Decimal.MAX_COMPACT_PRECISION;
 
 Review comment:
   you can move decimal logic into the switch

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to