Skip to content

Commit f622dc4

Browse files
committed
chore(query): add function v2 repeat
1 parent fc546d1 commit f622dc4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/query/functions-v2/tests/it/scalars/string.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ fn test_ord(file: &mut impl Write) {
692692
fn test_repeat(file: &mut impl Write) {
693693
run_ast(file, "repeat('3', NULL)", &[]);
694694
run_ast(file, "repeat('3', 5)", &[]);
695+
run_ast(file, "repeat('3', 1000001)", &[]);
695696
let table = [("a", DataType::String, Column::from_data(&["a", "b", "c"]))];
696697
run_ast(file, "repeat(a, 3)", &table);
697698
}

src/query/functions-v2/tests/it/scalars/testdata/string.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,14 @@ output domain : Unknown
27412741
output : "33333"
27422742

27432743

2744+
error:
2745+
--> SQL:1:1
2746+
|
2747+
1 | repeat('3', 1000001)
2748+
| ^^^^^^^^^^^^^^^^^^^^ Too many times to repeat: (1000001), maximum is: 1000000
2749+
2750+
2751+
27442752
ast : repeat(a, 3)
27452753
raw expr : repeat(ColumnRef(0)::String, 3_u8)
27462754
checked expr : repeat<String, UInt64>(ColumnRef(0), CAST(3_u8 AS UInt64))

0 commit comments

Comments
 (0)