You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by "gong (via GitHub)" <gi...@apache.org> on 2023/03/01 10:21:01 UTC

[GitHub] [inlong] gong commented on a diff in pull request #7478: [INLONG-7477][Sort] Fix the metadata of table write error for canal-json

gong commented on code in PR #7478:
URL: https://github.com/apache/inlong/pull/7478#discussion_r1121474606


##########
inlong-sort/sort-formats/format-json/src/main/java/org/apache/inlong/sort/formats/json/canal/CanalJsonEnhancedSerializationSchema.java:
##########
@@ -122,9 +127,16 @@ private static RowType createJsonRowType(DataType physicalDataType, List<Writeab
 
     @Override
     public void open(InitializationContext context) {
-        reuse = new GenericRowData(2 + wirteableMetadataFieldGetter.length);
+        int size = 2 + wirteableMetadataFieldGetter.length;
+        if (typeIndex != -1) {
+            size--;
+        }

Review Comment:
   I don't undestand this logic



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org