binary-signal commented on code in PR #3529:
URL: https://github.com/apache/fluss/pull/3529#discussion_r3485363533


##########
fluss-client/src/main/java/org/apache/fluss/client/write/WriterClient.java:
##########
@@ -176,10 +176,15 @@ private void doSend(WriteRecord record, WriteCallback 
callback) {
 
             TableInfo tableInfo = record.getTableInfo();
             PhysicalTablePath physicalTablePath = 
record.getPhysicalTablePath();
-            dynamicPartitionCreator.checkAndCreatePartitionAsync(
-                    physicalTablePath,
-                    tableInfo.getPartitionKeys(),
-                    tableInfo.getTableConfig().getAutoPartitionStrategy());
+            // Skip on non-partitioned tables: the callee returns immediately 
when
+            // partitionName is null, but the expensive AutoPartitionStrategy 
argument
+            // would still be evaluated per record without this guard.
+            if (tableInfo.isPartitioned()) {
+                dynamicPartitionCreator.checkAndCreatePartitionAsync(
+                        physicalTablePath,
+                        tableInfo.getPartitionKeys(),
+                        tableInfo.getTableConfig().getAutoPartitionStrategy());

Review Comment:
   That makes sense, I will provide a revised version later today or tomorrow 



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