File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
paimon-api/src/main/java/org/apache/paimon
paimon-core/src/main/java/org/apache/paimon/schema Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -2351,6 +2351,7 @@ public InlineElement getDescription() {
23512351 + " Default is 10 * TARGET_FILE_SIZE." )
23522352 .build ());
23532353
2354+ @ Immutable
23542355 public static final ConfigOption <Boolean > PK_CLUSTERING_OVERRIDE =
23552356 key ("pk-clustering-override" )
23562357 .booleanType ()
Original file line number Diff line number Diff line change 7878
7979import static org .apache .paimon .CoreOptions .AGG_FUNCTION ;
8080import static org .apache .paimon .CoreOptions .BUCKET_KEY ;
81+ import static org .apache .paimon .CoreOptions .CLUSTERING_COLUMNS ;
8182import static org .apache .paimon .CoreOptions .DELETION_VECTORS_ENABLED ;
8283import static org .apache .paimon .CoreOptions .DELETION_VECTORS_MODIFIABLE ;
8384import static org .apache .paimon .CoreOptions .DISTINCT ;
8788import static org .apache .paimon .CoreOptions .IGNORE_UPDATE_BEFORE ;
8889import static org .apache .paimon .CoreOptions .LIST_AGG_DELIMITER ;
8990import static org .apache .paimon .CoreOptions .NESTED_KEY ;
91+ import static org .apache .paimon .CoreOptions .PK_CLUSTERING_OVERRIDE ;
9092import static org .apache .paimon .CoreOptions .SEQUENCE_FIELD ;
9193import static org .apache .paimon .catalog .AbstractCatalog .DB_SUFFIX ;
9294import static org .apache .paimon .catalog .Identifier .DEFAULT_MAIN_BRANCH ;
@@ -1167,6 +1169,15 @@ public static void checkAlterTableOption(
11671169 IGNORE_UPDATE_BEFORE .key ()));
11681170 }
11691171 }
1172+
1173+ if (CLUSTERING_COLUMNS .key ().equals (key )) {
1174+ if (options .containsKey (PK_CLUSTERING_OVERRIDE .key ())) {
1175+ throw new UnsupportedOperationException (
1176+ String .format (
1177+ "Cannot change %s when %s enabled." ,
1178+ CLUSTERING_COLUMNS .key (), PK_CLUSTERING_OVERRIDE .key ()));
1179+ }
1180+ }
11701181 }
11711182
11721183 public static void checkResetTableOption (String key ) {
You can’t perform that action at this time.
0 commit comments