MehulBatra commented on code in PR #1508:
URL: https://github.com/apache/fluss/pull/1508#discussion_r2269354933


##########
fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/IcebergLakeCatalog.java:
##########
@@ -145,10 +143,11 @@ private void createTable(TablePath tablePath, 
Catalog.TableBuilder tableBuilder)
         }
     }
 
-    public Schema convertToIcebergSchema(TableDescriptor tableDescriptor) {
+    public Schema convertToIcebergSchema(TableDescriptor tableDescriptor, 
boolean isPkTable) {

Review Comment:
   Instead of boolean isPkTable can we think of using an enum it make things 
more clear/self explaining, extensible and might reduce logic duplication
   ```
   public enum TableType {
       PRIMARY_KEY, 
       LOG; 
   
       public boolean isPrimaryKey() {
           return this == PRIMARY_KEY;
       }
   
       public boolean isLog() {
           return this == LOG;
       }
   }
   ```
   ```
   convertToIcebergSchema(td, TableType.PRIMARY_KEY);
   ```
   Instead of 
   ```
   convertToIcebergSchema(td, true);
   ```
   What do you guys think @SML0127 @luoyuxia ? please feel free to add your 
inputs



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