Skip to content

Commit ac4037e

Browse files
authored
fix(cubestore): Error with pre-aggregation and filters containing comma. (#7364)
1 parent 3493971 commit ac4037e

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

rust/cubestore/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,8 @@ async fn ilike(service: Box<dyn SqlClient>) {
15831583
('test [ special 1', '%test [%'),\
15841584
('test ( special 2', '%test (%'),\
15851585
('111 test {)?*|+aaa', '%test {)?*|+aaa'),\
1586-
('test2 }]\\\\222 ', 'test2 }]\\\\\\\\%')\
1586+
('test2 }]\\\\222 ', 'test2 }]\\\\\\\\%'),\
1587+
('test2 -[]{}()*+?.,^$|# 2', '%-[]{}()*+?.,^$|#%')\
15871588
",
15881589

15891590
)
@@ -1625,13 +1626,24 @@ async fn ilike(service: Box<dyn SqlClient>) {
16251626
.exec_query("SELECT t FROM s.strings WHERE t ILIKE CONCAT('%', '(', '%') ORDER BY t")
16261627
.await
16271628
.unwrap();
1628-
assert_eq!(to_rows(&r), rows(&["test ( special 2"]));
1629+
assert_eq!(
1630+
to_rows(&r),
1631+
rows(&["test ( special 2", "test2 -[]{}()*+?.,^$|# 2"])
1632+
);
16291633

16301634
let r = service
16311635
.exec_query("SELECT t FROM s.strings WHERE t ILIKE CONCAT('%', '?*|+', '%') ORDER BY t")
16321636
.await
16331637
.unwrap();
16341638
assert_eq!(to_rows(&r), rows(&["111 test {)?*|+aaa"]));
1639+
1640+
let r = service
1641+
.exec_query(
1642+
"SELECT t FROM s.strings WHERE t ILIKE CONCAT('%', '-[]{}()*+?.,^', '%') ORDER BY t",
1643+
)
1644+
.await
1645+
.unwrap();
1646+
assert_eq!(to_rows(&r), rows(&["test2 -[]{}()*+?.,^$|# 2"]));
16351647
// Compare constant string with a bunch of patterns.
16361648
// Inputs are: ('aba', '%ABA'), ('ABa', '%aba%'), ('CABA', 'aba%'), ('ZABA', '%a%b%a%'),
16371649
// ('ZZZ', 'zzz'), ('TTT', 'TTT').
@@ -1664,7 +1676,8 @@ async fn ilike(service: Box<dyn SqlClient>) {
16641676
("some_underscore", "%some\\_underscore%"),
16651677
("test ( special 2", "%test (%"),
16661678
("test [ special 1", "%test [%"),
1667-
("test2 }]\\222 ", "test2 }]\\\\%")
1679+
("test2 -[]{}()*+?.,^$|# 2", "%-[]{}()*+?.,^$|#%"),
1680+
("test2 }]\\222 ", "test2 }]\\\\%"),
16681681
])
16691682
);
16701683

0 commit comments

Comments
 (0)