Hisoka-X commented on code in PR #8492:
URL: https://github.com/apache/seatunnel/pull/8492#discussion_r1915971645


##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java:
##########
@@ -169,7 +169,9 @@ private int getBytesForValue(Object v, SeaTunnelDataType<?> 
dataType) {
                 if (elementType instanceof DecimalType) {
                     return ((Object[]) v).length * 36;
                 }
-
+                if (elementType instanceof MapType) {
+                    return getArrayMapNotNullSize(v);
+                }

Review Comment:
   why not extend 
https://github.com/apache/seatunnel/blob/875fcd89c59faa4c7b97f3e2c1bf3be707a205cd/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java#L213
 to support parse map type? After this we can reuse `getBytesForValue` to parse 
map.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to