Skip to content

Commit 320a49d

Browse files
committed
fix the review remarks
1 parent 2715492 commit 320a49d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

client-v2/src/test/java/com/clickhouse/client/datatypes/DataTypeTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ public void testTimeDataType() throws Exception {
692692

693693
String table = "test_time_type";
694694
client.execute("DROP TABLE IF EXISTS " + table).get();
695-
client.execute(tableDefinition(table, "o_num UInt32", "time Time"), (CommandSettings) new CommandSettings().serverSetting("enable_time_time64_type", "1")).get();
695+
client.execute(tableDefinition(table, "o_num UInt32", "time Time"), (CommandSettings) new CommandSettings().serverSetting("allow_experimental_time_time64_type", "1")).get();
696696

697697
String insertSQL = "INSERT INTO " + table + " VALUES (1, '999:00:00'), (2, '999:59:59'), (3, '000:00:00'), (4, '-999:59:59')";
698698
try (QueryResponse response = client.query(insertSQL).get()) {}
@@ -731,7 +731,7 @@ public void testTime64() throws Exception {
731731
String table = "test_time64_type";
732732
client.execute("DROP TABLE IF EXISTS " + table).get();
733733
client.execute(tableDefinition(table, "o_num UInt32", "t_sec Time64(0)", "t_ms Time64(3)", "t_us Time64(6)", "t_ns Time64(9)"),
734-
(CommandSettings) new CommandSettings().serverSetting("enable_time_time64_type", "1")).get();
734+
(CommandSettings) new CommandSettings().serverSetting("allow_experimental_time_time64_type", "1")).get();
735735

736736
String[][] values = new String[][] {
737737
{"00:01:00.123", "00:01:00.123", "00:01:00.123456", "00:01:00.123456789"},
@@ -821,7 +821,7 @@ private void testDynamicWith(String withWhat, Object[] values, String[] expected
821821
client.execute("DROP TABLE IF EXISTS " + table).get();
822822
client.execute(tableDefinition(table, "rowId Int32", "field Dynamic"),
823823
(CommandSettings) new CommandSettings().serverSetting("allow_experimental_dynamic_type", "1")
824-
.serverSetting("enable_time_time64_type", "1")).get();
824+
.serverSetting("allow_experimental_time_time64_type", "1")).get();
825825

826826
client.register(DTOForDynamicPrimitivesTests.class, client.getTableSchema(table));
827827

@@ -850,7 +850,7 @@ private void testVariantWith(String withWhat, String[] fields, Object[] values,
850850
client.execute(tableDefinition(table, actualFields),
851851
(CommandSettings) new CommandSettings()
852852
.serverSetting("allow_experimental_variant_type", "1")
853-
.serverSetting("enable_time_time64_type", "1")).get();
853+
.serverSetting("allow_experimental_time_time64_type", "1")).get();
854854

855855
client.register(DTOForVariantPrimitivesTests.class, client.getTableSchema(table));
856856

jdbc-v2/src/test/java/com/clickhouse/jdbc/DataTypeTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,11 @@ public void testDateTypes() throws SQLException {
555555

556556
@Test(groups = { "integration" })
557557
public void testTimeTypes() throws SQLException {
558+
if (ClickHouseVersion.of(getServerVersion()).check("(,25.6]")) {
559+
return; // Time64 introduced in 25.6
560+
}
558561
Properties createProperties = new Properties();
559-
createProperties.put(ClientConfigProperties.serverSetting("enable_time_time64_type"), "1");
562+
createProperties.put(ClientConfigProperties.serverSetting("allow_experimental_time_time64_type"), "1");
560563
runQuery("CREATE TABLE test_time64 (order Int8, "
561564
+ "time Time('UTC'), time64 Time64(9) "
562565
+ ") ENGINE = MergeTree ORDER BY ()",

0 commit comments

Comments
 (0)