Skip to content

Commit 16d9fd0

Browse files
committed
Add enable_time_time64_type setting to queries
1 parent 23ddc8f commit 16d9fd0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

ut/client_ut.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ TEST_P(ClientCase, Array) {
158158
TEST_P(ClientCase, Time) {
159159
Block b;
160160

161-
client_->Execute("CREATE TEMPORARY TABLE IF NOT EXISTS test_clickhouse_cpp_time (t Time)");
161+
client_->Execute("CREATE TEMPORARY TABLE IF NOT EXISTS test_clickhouse_cpp_time (t Time) "
162+
"SETTINGS enable_time_time64_type = 1");
162163
auto t = std::make_shared<ColumnTime>();
163164

164165
int32_t ts = 3600 * 15 + 60 * 4 + 5;
@@ -183,7 +184,8 @@ TEST_P(ClientCase, Time64) {
183184
Block b;
184185

185186
client_->Execute("CREATE TEMPORARY TABLE IF NOT EXISTS test_clickhouse_cpp_time64 "
186-
"(t0 Time64(0), t3 Time64(3), t6 Time64(6))");
187+
"(t0 Time64(0), t3 Time64(3), t6 Time64(6)) "
188+
"SETTINGS enable_time_time64_type = 1");
187189
auto t0 = std::make_shared<ColumnTime64>(0);
188190
auto t3 = std::make_shared<ColumnTime64>(3);
189191
auto t6 = std::make_shared<ColumnTime64>(6);

ut/roundtrip_column.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ ColumnRef RoundtripColumnValues(Client& client, ColumnRef expected) {
3737
const std::string type_name = result->GetType().GetName();
3838
client.Execute("DROP TEMPORARY TABLE IF EXISTS temporary_roundtrip_table;");
3939
// id column is to have the same order of rows on SELECT
40-
client.Execute("CREATE TEMPORARY TABLE IF NOT EXISTS temporary_roundtrip_table (id UInt32, col " + type_name + ");");
40+
client.Execute("CREATE TEMPORARY TABLE IF NOT EXISTS temporary_roundtrip_table (id UInt32, col " + type_name + ") "
41+
"SETTINGS enable_time_time64_type = 1");
4142
{
4243
Block block;
4344
block.AppendColumn("col", expected);

0 commit comments

Comments
 (0)