Skip to content

Commit 27c5f53

Browse files
mcheshkovKSDaemon
authored andcommitted
test(cubestore): Test quote character escaping
1 parent 635ea38 commit 27c5f53

File tree

1 file changed

+9
-9
lines changed
  • rust/cubestore/cubestore-sql-tests/src

1 file changed

+9
-9
lines changed

rust/cubestore/cubestore-sql-tests/src/tests.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,9 +1351,9 @@ async fn column_escaping(service: Box<dyn SqlClient>) {
13511351

13521352
let result = service
13531353
.exec_query(
1354-
"SELECT date_trunc('day', `timestamp`.t) `day`, sum(`timestamp`.amount) \
1355-
FROM foo.timestamps `timestamp` \
1356-
WHERE `timestamp`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
1354+
"SELECT date_trunc('day', `timestamp_``_quote`.t) `day_``_quote`, sum(`timestamp_``_quote`.amount) \
1355+
FROM foo.timestamps `timestamp_``_quote` \
1356+
WHERE `timestamp_``_quote`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
13571357
)
13581358
.await
13591359
.unwrap();
@@ -1448,9 +1448,9 @@ async fn case_column_escaping(service: Box<dyn SqlClient>) {
14481448
.unwrap();
14491449

14501450
let result = service.exec_query(
1451-
"SELECT date_trunc('day', `timestamp`.t) `day`, sum(CASE WHEN `timestamp`.t > to_timestamp('2020-01-02T00:01:00.000Z') THEN `timestamp`.amount END) \
1452-
FROM foo.timestamps `timestamp` \
1453-
WHERE `timestamp`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1"
1451+
"SELECT date_trunc('day', `timestamp_``_quote`.t) `day_``_quote`, sum(CASE WHEN `timestamp_``_quote`.t > to_timestamp('2020-01-02T00:01:00.000Z') THEN `timestamp_``_quote`.amount END) \
1452+
FROM foo.timestamps `timestamp_``_quote` \
1453+
WHERE `timestamp_``_quote`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1"
14541454
).await.unwrap();
14551455

14561456
assert_eq!(
@@ -1482,9 +1482,9 @@ async fn inner_column_escaping(service: Box<dyn SqlClient>) {
14821482

14831483
let result = service
14841484
.exec_query(
1485-
"SELECT date_trunc('day', `t`) `day`, sum(`amount`) \
1486-
FROM foo.timestamps `timestamp` \
1487-
WHERE `t` >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
1485+
"SELECT date_trunc('day', `t_``_quote`) `day_``_quote`, sum(`amount_``_quote`) \
1486+
FROM foo.timestamps `timestamp_``_quote` \
1487+
WHERE `t_``_quote` >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
14881488
)
14891489
.await
14901490
.unwrap();

0 commit comments

Comments
 (0)