Copilot commented on code in PR #6202:
URL: https://github.com/apache/paimon/pull/6202#discussion_r2348276970


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/sink/MultiTableCommittableTypeInfo.java:
##########
@@ -69,7 +69,7 @@ public TypeSerializer<MultiTableCommittable> 
createSerializer(SerializerConfig c
      * Do not annotate with <code>@override</code> here to maintain 
compatibility with Flink 2.0+.
      */
     public TypeSerializer<MultiTableCommittable> 
createSerializer(ExecutionConfig config) {
-        // no copy, so that data from writer is directly going into committer 
while chaining
+        // no copy, so that data from writer is directly going into committers 
while chaining

Review Comment:
   The word 'committers' should be 'committer' (singular) to maintain 
consistency with the comment's context about data flow.
   ```suggestion
           // no copy, so that data from writer is directly going into 
committer while chaining
   ```



##########
paimon-hive/paimon-hive-connector-common/src/main/java/org/apache/paimon/hive/mapred/PaimonOutputCommitter.java:
##########
@@ -49,7 +49,7 @@
 
 import static org.apache.paimon.hive.utils.HiveUtils.createFileStoreTable;
 
-/** A Paimon table committer for adding data files to the Paimon table. */
+/** A Paimon table committers for adding data files to the Paimon table. */

Review Comment:
   The word 'committers' should be 'committer' (singular) to match the class 
name PaimonOutputCommitter.
   ```suggestion
   /** A Paimon table committer for adding data files to the Paimon table. */
   ```



##########
paimon-core/src/main/java/org/apache/paimon/io/RowDataRollingFileWriter.java:
##########
@@ -90,8 +92,9 @@ private static SimpleStatsProducer createStatsProducer(
             RowType rowType,
             SimpleColStatsCollector.Factory[] statsCollectors) {
         boolean isDisabled =
-                Arrays.stream(SimpleColStatsCollector.create(statsCollectors))
-                        .allMatch(p -> p instanceof 
NoneSimpleColStatsCollector);
+                statsCollectors == null
+                        || 
Arrays.stream(SimpleColStatsCollector.create(statsCollectors))
+                                .allMatch(p -> p instanceof 
NoneSimpleColStatsCollector);

Review Comment:
   There's a potential NullPointerException. If `statsCollectors` is null, 
calling `SimpleColStatsCollector.create(statsCollectors)` will fail. The null 
check should encompass the entire condition or `SimpleColStatsCollector.create` 
should handle null input.



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