snuyanzin commented on code in PR #30060:
URL: https://github.com/apache/flink/pull/30060#discussion_r4660082971
##########
flink-table/flink-table-common/src/test/java/org/apache/flink/table/catalog/CatalogPropertiesUtilTest.java:
##########
@@ -113,6 +113,26 @@ void testCatalogTableSerde(ResolvedCatalogBaseTable
testTable) {
assertThat(testTable.getOrigin()).hasToString(deserializedTable.toString());
}
+ @Test
+ void testCatalogTableSerdeKeepsOptionsStartingWithSchema() {
+ // e.g. the required 'schema-name' option of the Flink CDC Postgres
source
+ final Map<String, String> options =
+ Map.of("connector", "test", "schema-name", "public",
"schemaless", "true");
+ final ResolvedCatalogTable table =
+ new ResolvedCatalogTable(
+ CatalogTable.newBuilder()
+ .schema(Schema.newBuilder().column("f1",
DataTypes.INT()).build())
+ .options(options)
+ .build(),
+ ResolvedSchema.of(Column.physical("f1",
DataTypes.INT())));
Review Comment:
```suggestion
final ResolvedSchema resolvedSchema =
ResolvedSchema.of(Column.physical("f1", DataTypes.INT()));
final ResolvedCatalogTable table =
new ResolvedCatalogTable(
CatalogTable.newBuilder()
.schema(Schema.newBuilder().fromResolvedSchema(resolvedSchema).build())
.options(options)
.build(),
resolvedSchema);
```
--
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]