Commit 49bca0c
committed
test(api): tighten lazy plan assertions and fix misplaced SHOW TABLES case
Move the SHOW TABLES case out of testNonQueryStatementsBlockedByParser
and into testNonQueryStatementsBlockedByWhitelist, where its error
message 'Only query statements are supported' actually belongs. The
parser accepts SHOW TABLES; the whitelist blocks it.
Replace trivial LogicalFilter / LogicalProject / LogicalAggregate
substring checks in UnifiedSqlSpecTest with assertions that prove the
specific feature under test: double-quoted string literal, MATCH as a
non-reserved function, GROUP BY ordinal resolution, boolean-to-integer
cast folding, and BABEL's string-to-integer coercion. Use AS aliases to
pin field names and avoid Calcite's EXPR$0 placeholders.
Signed-off-by: Chen Dai <daichen@amazon.com>1 parent b0be1f6 commit 49bca0c
2 files changed
Lines changed: 13 additions & 14 deletions
File tree
- api/src/test/java/org/opensearch/sql/api
Lines changed: 3 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
240 | 243 | | |
241 | 244 | | |
242 | 245 | | |
| |||
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
248 | | - | |
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | 259 | | |
265 | 260 | | |
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | | - | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | | - | |
84 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
88 | 90 | | |
89 | | - | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
94 | | - | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
0 commit comments