ashulin commented on code in PR #2637:
URL: 
https://github.com/apache/incubator-seatunnel/pull/2637#discussion_r967640496


##########
seatunnel-translation/seatunnel-translation-spark/seatunnel-translation-spark-common/src/main/java/org/apache/seatunnel/translation/spark/common/serialization/InternalRowConverter.java:
##########
@@ -102,10 +100,7 @@ private static InternalRow convert(SeaTunnelRow 
seaTunnelRow, SeaTunnelRowType r
             if 
(TypeConverterUtils.ROW_KIND_FIELD.equals(rowType.getFieldName(i))) {
                 values[i].update(seaTunnelRow.getRowKind().toByteValue());
             } else {
-                Object fieldValue = convert(seaTunnelRow.getField(i), 
rowType.getFieldType(i));
-                if (fieldValue != null) {
-                    values[i].update(fieldValue);
-                }
+                values[i].update(convert(seaTunnelRow.getField(i), 
rowType.getFieldType(i)));

Review Comment:
   ```suggestion
                   Object fieldValue = convert(seaTunnelRow.getField(i), 
rowType.getFieldType(i));
                   if (fieldValue != null) {
                       values[i].update(fieldValue);
                   }
   ```
   you can see [Bug] [seatunnel-translation-spark] Fix NPE caused by incorrect 
setting of field nullable 
([#2670](https://github.com/apache/incubator-seatunnel/issues/2670))



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