Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions rust/cubestore/cubestore-sql-tests/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,9 +1351,9 @@ async fn column_escaping(service: Box<dyn SqlClient>) {

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

let result = service.exec_query(
"SELECT date_trunc('day', `timestamp`.t) `day`, sum(CASE WHEN `timestamp`.t > to_timestamp('2020-01-02T00:01:00.000Z') THEN `timestamp`.amount END) \
FROM foo.timestamps `timestamp` \
WHERE `timestamp`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1"
"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) \
FROM foo.timestamps `timestamp_``_quote` \
WHERE `timestamp_``_quote`.t >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1"
).await.unwrap();

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

let result = service
.exec_query(
"SELECT date_trunc('day', `t`) `day`, sum(`amount`) \
FROM foo.timestamps `timestamp` \
WHERE `t` >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
"SELECT date_trunc('day', `t_``_quote`) `day_``_quote`, sum(`amount_``_quote`) \
FROM foo.timestamps `timestamp_``_quote` \
WHERE `t_``_quote` >= to_timestamp('2020-01-02T00:00:00.000Z') GROUP BY 1",
)
.await
.unwrap();
Expand Down
Loading