Skip to content

Commit 2f05ae7

Browse files
committed
Add enable_time_time64_type setting to queries
1 parent 23ddc8f commit 2f05ae7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ut/client_ut.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ 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+
"ENGINE = Memory "
163+
"SETTINGS enable_time_time64_type = 1");
162164
auto t = std::make_shared<ColumnTime>();
163165

164166
int32_t ts = 3600 * 15 + 60 * 4 + 5;
@@ -183,7 +185,9 @@ TEST_P(ClientCase, Time64) {
183185
Block b;
184186

185187
client_->Execute("CREATE TEMPORARY TABLE IF NOT EXISTS test_clickhouse_cpp_time64 "
186-
"(t0 Time64(0), t3 Time64(3), t6 Time64(6))");
188+
"(t0 Time64(0), t3 Time64(3), t6 Time64(6)) "
189+
"ENGINE = Memory "
190+
"SETTINGS enable_time_time64_type = 1");
187191
auto t0 = std::make_shared<ColumnTime64>(0);
188192
auto t3 = std::make_shared<ColumnTime64>(3);
189193
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+
"ENGINE = Memory SETTINGS enable_time_time64_type = 1");
4142
{
4243
Block block;
4344
block.AppendColumn("col", expected);

0 commit comments

Comments
 (0)