Skip to content

Commit f543b33

Browse files
committed
[ITest] Add test cases for prefix and suffix expressions in LIKE.
1 parent c354127 commit f543b33

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

test/ours/end2end-pos-select-like_prefix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
description: LIKE expression with match any pattern.
1+
description: LIKE expression with a prefix pattern.
22
db: ours
33
query: |
44
SELECT rstring FROM R WHERE rstring LIKE "Nmt%";
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
description: LIKE expression with a suffix pattern.
2+
db: ours
3+
query: |
4+
SELECT rstring FROM R WHERE rstring LIKE "%ha";
5+
required: YES
6+
7+
stages:
8+
lexer:
9+
out: |
10+
-:1:1: SELECT TK_Select
11+
-:1:8: rstring TK_IDENTIFIER
12+
-:1:16: FROM TK_From
13+
-:1:21: R TK_IDENTIFIER
14+
-:1:23: WHERE TK_Where
15+
-:1:29: rstring TK_IDENTIFIER
16+
-:1:37: LIKE TK_Like
17+
-:1:42: "%ha" TK_STRING_LITERAL
18+
-:1:47: ; TK_SEMICOL
19+
err: NULL
20+
num_err: 0
21+
returncode: 0
22+
23+
parser:
24+
out: |
25+
SELECT rstring
26+
FROM R
27+
WHERE (rstring LIKE "%ha");
28+
err: NULL
29+
num_err: 0
30+
returncode: 0
31+
32+
sema:
33+
out: NULL
34+
err: NULL
35+
num_err: 0
36+
returncode: 0
37+
38+
end2end:
39+
cli_args: --insist-no-ternary-logic
40+
out: |
41+
"tevroexFNrTkdha"
42+
err: NULL
43+
num_err: 0
44+
returncode: 0

0 commit comments

Comments
 (0)