Skip to content

Commit 5eb61d0

Browse files
fix unit tests
1 parent 15cf504 commit 5eb61d0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/Storages/tests/gtest_transform_query_for_external_database.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,7 @@ TEST(TransformQueryForExternalDatabase, Issue7245)
301301

302302
check(state, 1, {"apply_id", "apply_type", "apply_status", "create_time"},
303303
"SELECT apply_id FROM test.table WHERE apply_type = 2 AND create_time > addDays(toDateTime('2019-01-01 01:02:03', 'UTC'),-7) AND apply_status IN (3,4)",
304-
R"(SELECT "apply_id", "apply_type", "apply_status", "create_time" FROM "test"."table" WHERE ("apply_type" = 2) AND ("create_time" > '2018-12-25 01:02:03') AND ("apply_status" IN (3, 4)))",
305-
R"(SELECT "apply_id", "apply_type", "apply_status", "create_time" FROM "test"."table" WHERE ("apply_type" = 2) AND ("create_time" > 1545699723) AND ("apply_status" IN (3, 4)))");
304+
R"(SELECT "apply_id", "apply_type", "apply_status", "create_time" FROM "test"."table" WHERE ("apply_type" = 2) AND ("create_time" > '2018-12-25 01:02:03') AND ("apply_status" IN (3, 4)))");
306305
}
307306

308307
TEST(TransformQueryForExternalDatabase, Aliases)
@@ -396,8 +395,7 @@ TEST(TransformQueryForExternalDatabase, ToDate)
396395

397396
check(state, 1, {"a", "b", "foo"},
398397
"SELECT foo FROM table WHERE a=10 AND b=toDate('2019-10-05', 'UTC')",
399-
R"(SELECT "a", "b", "foo" FROM "test"."table" WHERE ("a" = 10) AND ("b" = '2019-10-05'))",
400-
R"(SELECT "a", "b", "foo" FROM "test"."table" WHERE ("a" = 10) AND ("b" = 18174))");
398+
R"(SELECT "a", "b", "foo" FROM "test"."table" WHERE ("a" = 10) AND ("b" = '2019-10-05'))");
401399
}
402400

403401
TEST(TransformQueryForExternalDatabase, Analyzer)
@@ -422,8 +420,7 @@ TEST(TransformQueryForExternalDatabase, Analyzer)
422420

423421
check(state, 1, {"is_value"},
424422
"SELECT is_value FROM table WHERE is_value = true",
425-
R"(SELECT "is_value" FROM "test"."table" WHERE "is_value" = true)",
426-
R"(SELECT "is_value" FROM "test"."table" WHERE "is_value" = 1)");
423+
R"(SELECT "is_value" FROM "test"."table" WHERE "is_value" = true)");
427424

428425
check(state, 1, {"is_value"},
429426
"SELECT is_value FROM table WHERE is_value = 1",

0 commit comments

Comments
 (0)