luoyuxia commented on code in PR #1444:
URL: https://github.com/apache/fluss/pull/1444#discussion_r2269668873


##########
fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/CoordinatorService.java:
##########
@@ -261,6 +261,17 @@ public CompletableFuture<CreateTableResponse> 
createTable(CreateTableRequest req
             tableAssignment = generateAssignment(bucketCount, replicaFactor, 
servers);
         }
 
+        // TODO: should support tiering a primary key table to lance in the 
future
+        // currently, we don't support primary key table for lance
+        if (isDataLakeEnabled(tableDescriptor)
+                && dataLakeFormat != null
+                && dataLakeFormat.equals(DataLakeFormat.LANCE)) {

Review Comment:
   Not hard code in here, please  check in LanceLakeCatalog. 



##########
fluss-lake/fluss-lake-lance/src/test/java/com/alibaba/fluss/lake/lance/LakeEnabledTableCreateITCase.java:
##########
@@ -201,4 +203,23 @@ void testLogTable() throws Exception {
                                 logC18, logC19));
         
assertThat(expectedSchema).isEqualTo(LanceDatasetAdapter.getSchema(config).get());
     }
+
+    @Test
+    void testPrimaryKeyTable() throws Exception {
+        TableDescriptor pkTable =
+                TableDescriptor.builder()
+                        .schema(
+                                Schema.newBuilder()
+                                        .column("pk_c1", DataTypes.INT())
+                                        .column("pk_c2", DataTypes.STRING())
+                                        .primaryKey("pk_c1")
+                                        .build())
+                        .distributedBy(BUCKET_NUM)
+                        .property(ConfigOptions.TABLE_DATALAKE_ENABLED, true)
+                        .build();
+        TablePath pkTablePath = TablePath.of(DATABASE, "pk_table");
+        assertThatThrownBy(() -> admin.createTable(pkTablePath, pkTable, 
false).get())
+                .cause()
+                .isInstanceOf(InvalidTableException.class);

Review Comment:
   Also check the exception message



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