Aitozi commented on code in PR #6394:
URL: https://github.com/apache/paimon/pull/6394#discussion_r2447917522


##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java:
##########
@@ -675,4 +679,26 @@ private static void 
validateIncrementalClustering(TableSchema schema, CoreOption
                     PRIMARY_KEY.key());
         }
     }
+
+    public static void validateChainTableOptions(
+            Map<String, String> tableOptions, @Nullable String primaryKeys, 
boolean partitionTbl) {
+        if 
(Boolean.parseBoolean(tableOptions.get(CoreOptions.CHAIN_TABLE_ENABLED.key()))) 
{

Review Comment:
   change to `options.get(CoreOptions.CHAIN_TABLE_ENABLED)`



##########
paimon-core/src/main/java/org/apache/paimon/schema/SchemaValidation.java:
##########
@@ -675,4 +679,26 @@ private static void 
validateIncrementalClustering(TableSchema schema, CoreOption
                     PRIMARY_KEY.key());
         }
     }
+
+    public static void validateChainTableOptions(
+            Map<String, String> tableOptions, @Nullable String primaryKeys, 
boolean partitionTbl) {
+        if 
(Boolean.parseBoolean(tableOptions.get(CoreOptions.CHAIN_TABLE_ENABLED.key()))) 
{
+            Options options = Options.fromMap(tableOptions);

Review Comment:
   I think we should also check that the `changelog-producer != ("lookup", 
"full-compaction")`



##########
paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileReaderFactory.java:
##########
@@ -95,6 +96,20 @@ private KeyValueFileReaderFactory(
         this.dvFactory = dvFactory;
     }
 
+    public KeyValueFileReaderFactory(KeyValueFileReaderFactory factory) {

Review Comment:
   can we introduce a copy method to replace this construct?



##########
paimon-api/src/main/java/org/apache/paimon/CoreOptions.java:
##########
@@ -226,6 +226,36 @@ public InlineElement getDescription() {
     public static final ConfigOption<String> BRANCH =
             
key("branch").stringType().defaultValue("main").withDescription("Specify branch 
name.");
 
+    public static final ConfigOption<Boolean> CHAIN_TABLE_ENABLED =
+            key("chain-table.enabled")
+                    .booleanType()
+                    .defaultValue(false)
+                    .withDescription("Specify chain table enable.");
+
+    public static final ConfigOption<String> SCAN_FALLBACK_SNAPSHOT_BRANCH =
+            key("scan.fallback-snapshot-branch")

Review Comment:
   if it doesn't have the default value, we have to check this when the user 
enable the chain table



##########
paimon-core/src/main/java/org/apache/paimon/mergetree/compact/MergeTreeCompactManager.java:
##########
@@ -70,6 +70,8 @@ public class MergeTreeCompactManager extends 
CompactFutureManager {
 
     @Nullable private final RecordLevelExpire recordLevelExpire;
 
+    private final boolean isChainTbl;

Review Comment:
   to forceKeepDelete?



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