pvary commented on code in PR #15780:
URL: https://github.com/apache/iceberg/pull/15780#discussion_r3100063617


##########
flink/v2.1/flink/src/main/java/org/apache/iceberg/flink/sink/dynamic/DynamicRecord.java:
##########
@@ -79,7 +82,8 @@ public void setTableIdentifier(TableIdentifier 
tableIdentifier) {
   }
 
   public String branch() {
-    return branch;
+    return MoreObjects.firstNonNull(
+        branch, flinkWriteConf == null ? null : flinkWriteConf.branch());

Review Comment:
   Which one is more readable:
   ```
   if (branch != null) {
      return branch;
   } else if (defaultConf != null) {
      return defaultConf.branch();
   } else {
      return null;
   }
   ```
   Or
   ```
   return branch != null ? branch : defaultConf != null ? defaultConf.branch() 
: null;
   ```
   Or the one above?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to