Copilot commented on code in PR #11885:
URL: https://github.com/apache/gravitino/pull/11885#discussion_r3526960637
##########
catalogs-contrib/catalog-jdbc-clickhouse/src/test/java/org/apache/gravitino/catalog/clickhouse/operations/TestClickHouseTableOperations.java:
##########
@@ -1194,6 +1194,40 @@ void testParseSortOrdersFromMultilineShowCreateSql() {
Assertions.assertEquals("id", ((NamedReference)
sortOrders[0].expression()).fieldName()[0]);
}
+ @Test
+ void testParseSettingsFromCreateSql() {
+ TestableClickHouseTableOperations ops = new
TestableClickHouseTableOperations();
+
+ // Single setting
+ String sql1 =
+ "CREATE TABLE t1 (id Int32) ENGINE = MergeTree ORDER BY id SETTINGS
index_granularity = 4096";
+ Map<String, String> settings1 = ops.parseSettings(sql1);
+ Assertions.assertEquals(1, settings1.size());
+ Assertions.assertEquals("4096",
settings1.get("settings.index_granularity"));
Review Comment:
The test hardcodes the `settings.` prefix in the expected property key.
Since the production code uses `TableConstants.SETTINGS_PREFIX`, using the
constant here avoids duplicating the prefix and keeps the test aligned if the
prefix ever changes.
--
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]