Commit 3829dfa
authored
Stabilize subquery PPL ITs on the analytics-engine route (#5555)
CalcitePPLScalarSubqueryIT and CalcitePPLInSubqueryIT both seed an extra
worker doc via an unconditional raw PUT in init(). init() runs as @before
before every test method, and the analytics-engine parquet-backed store is
append-only on same-_id PUT, so the doc accumulated a duplicate per method
and inflated row counts across the suite. Guard the seed on a pre-loadIndex
isIndexExist check so it runs exactly once; behavior is unchanged on the
v2/Calcite route (same end state).
Skip the four tests that exercise behaviors the analytics-engine route does
not support, using the assumeNotAnalytics(...) registry (AnalyticsRouteLimitation)
plus matching excludeTestsMatching entries in integTestRemote so the skip set
stays countable in one place. Two new AnalyticsRouteLimitation constants:
- TEXT_FIELD_EXACT_MATCH: exact = / == on an explicitly text-mapped field
(no .keyword sub-field) returns no rows on the DataFusion scan. Sibling of
DYNAMIC_STRING_NO_KEYWORD for explicitly-mapped (not dynamic) text fields.
Covers testTwoUncorrelatedScalarSubqueriesInOr, testInSubqueryWithTableAlias,
testInCorrelatedSubquery (each filters department/occupation = '...').
- SUBSEARCH_MAXOUT_IN_SUBQUERY: the subsearch.maxout cap is lowered as a LIMIT
on the in-subquery semi-join's right side, which the route does not honor, so
the subsearch returns all rows. Covers testSubsearchMaxOut.
Results (-Dtests.analytics.parquet_indices=true against the analytics route):
CalcitePPLScalarSubqueryIT: 2/14 -> 13/13 run, 0 fail (1 excluded)
CalcitePPLInSubqueryIT: 7/18 -> 14/15 run, 0 fail (3 excluded; 1 @ignore)
v2/Calcite route unchanged: 14/14 and 17/17 (1 pre-existing @ignore).
Signed-off-by: Kai Huang <ahkcs@amazon.com>1 parent 9663d5f commit 3829dfa
4 files changed
Lines changed: 74 additions & 13 deletions
File tree
- integ-test
- src/test/java/org/opensearch/sql
- calcite/remote
- util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
1138 | 1150 | | |
1139 | 1151 | | |
1140 | 1152 | | |
| |||
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
37 | 44 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
340 | 349 | | |
341 | 350 | | |
342 | 351 | | |
| 352 | + | |
| 353 | + | |
343 | 354 | | |
344 | 355 | | |
345 | 356 | | |
| |||
358 | 369 | | |
359 | 370 | | |
360 | 371 | | |
| 372 | + | |
| 373 | + | |
361 | 374 | | |
362 | 375 | | |
363 | 376 | | |
| |||
372 | 385 | | |
373 | 386 | | |
374 | 387 | | |
| 388 | + | |
375 | 389 | | |
376 | 390 | | |
377 | 391 | | |
| |||
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | 50 | | |
| |||
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| 241 | + | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
50 | 63 | | |
51 | 64 | | |
52 | 65 | | |
| |||
108 | 121 | | |
109 | 122 | | |
110 | 123 | | |
111 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
112 | 137 | | |
113 | 138 | | |
114 | 139 | | |
| |||
0 commit comments