leonardBang commented on code in PR #4584:
URL: https://github.com/apache/flink-cdc/pull/4584#discussion_r4347149136
##########
flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-fluss/src/test/java/org/apache/flink/cdc/connectors/fluss/sink/FlussMetadataApplierTest.java:
##########
@@ -729,6 +729,37 @@ void
testExistingPrimaryKeyTableWithCustomBucketKeys(String bucketKeys) throws E
}
}
+ @Test
+ void testCreateTableWithDataLakeProperties() throws Exception {
+ Map<String, String> tableProperties = new HashMap<>();
+ tableProperties.put("paimon.file.format", "orc");
+ tableProperties.put("iceberg.write.format.default", "parquet");
+ Schema schema =
+ Schema.newBuilder()
+ .physicalColumn("id", DataTypes.BIGINT().notNull())
+ .primaryKey("id")
+ .build();
+ TableId tableId = TableId.tableId(DATABASE_NAME, "table1");
+
+ try (FlussMetaDataApplier applier =
+ new FlussMetaDataApplier(
+ FLUSS_CLUSTER_EXTENSION.getClientConfig(),
+ tableProperties,
+ Collections.emptyMap(),
+ Collections.emptyMap())) {
+ applier.applySchemaChange(new CreateTableEvent(tableId, schema));
+
+ TableDescriptor tableDescriptor =
+ admin.getTableInfo(new TablePath(DATABASE_NAME, "table1"))
+ .get()
+ .toTableDescriptor();
+ assertThat(tableDescriptor.getCustomProperties())
Review Comment:
Overall, this PR looks good to me. This test verifies that the options are
stored in the Fluss `TableDescriptor` as custom properties, but it does not
enable lake storage or check the resulting lake table. Would it be possible to
add an end-to-end test that creates a lake-enabled Fluss table through the
pipeline sink and asserts that an option such as
`properties.paimon.file.format: orc` is applied to the actual Paimon table?
That would cover the full path from sink configuration to the lake table.
--
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]