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


##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-tidb/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/tidb/source/deserializer/SeaTunnelRowStreamingRecordDeserializer.java:
##########
@@ -28,8 +28,11 @@
 import org.tikv.common.meta.TiTableInfo;
 import org.tikv.kvproto.Cdcpb;
 
+import lombok.extern.slf4j.Slf4j;
+
 import static org.tikv.common.codec.TableCodec.decodeObjects;
 
+@Slf4j

Review Comment:
   what's for?



##########
seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/SeaTunnelRow.java:
##########
@@ -34,16 +34,18 @@ public final class SeaTunnelRow implements Serializable {
     /** The array to store the actual internal format values. */
     private final Object[] fields;
 
-    private volatile int size;
-
     private Map<String, Object> options;
 
+    private volatile int size;
+
     public SeaTunnelRow(int arity) {
         this.fields = new Object[arity];
+        this.options = new HashMap<>();

Review Comment:
   I prefer lazy create options map. 
https://github.com/apache/seatunnel/pull/7911/files#diff-80c522a8e538f221b1dc2c8f5fd2bed219470cc71ad6f43959923625983976f2R77
 Because it useless at most time for now but it will created for each 
SeaTunnelRow.



##########
seatunnel-transforms-v2/src/main/java/org/apache/seatunnel/transform/common/SeaTunnelRowAccessor.java:
##########
@@ -45,4 +45,8 @@ public Object getField(int pos) {
     public Object[] getFields() {
         return row.getFields();
     }
+
+    public SeaTunnelRow getRow() {

Review Comment:
   If we have `getRow` method, the whole `SeaTunnelRowAccessor` looks 
unnecessary. Please add new method with fields you want to get. Do not add 
method get row itself.



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