Commit 5ec52c9
committed
Fix post-merge test failures after merging origin/main
After merging origin/main into worktree-merge-main-into-4636, several
test failures arose from changes in Calcite plan ordering and optimizer
behavior. This commit fixes all compilation errors, unit tests, and
integration tests.
Changes:
1. Compilation fixes (post-merge conflicts):
- OpenSearchTypeFactory.java: resolved merge conflict in type handling
- PPLFuncImpTable.java: removed duplicate registration
- CalcitePPLStreamstatsTest.java, CalcitePPLTimechartTest.java:
updated expected plans to match new upstream behavior
2. Logical plan ordering (LogicalSort/LogicalProject swap):
- 6 calcite_no_pushdown YAML files: swapped LogicalProject and
LogicalSort ordering in expected logical plans to match new
upstream plan generation (Sort now wraps Project)
3. SORT_AGG_METRICS reordering:
- explain_agg_sort_on_measure3.yaml, explain_agg_sort_on_measure4.yaml:
SORT_AGG_METRICS now appears after PROJECT in pushdown context,
with index updated to reference post-project position
- clickbench q37-q42 YAML files: same SORT_AGG_METRICS/PROJECT
reordering pattern
4. Optimizer non-determinism in paginating join tests:
- explain_agg_paginating_join1_alternative.yaml (new): alternative
expected plan for MergeJoin variant (vs HashJoin in primary YAML)
- CalciteExplainIT.java: updated testPaginatingAggForJoin to accept
both HashJoin and MergeJoin plans for join1
- explain_agg_paginating_join3.yaml: updated missing_order from
"last" to "first" for bank-side composite aggregation
5. Non-deterministic null handling:
- CalcitePPLConditionBuiltinFunctionIT.java: testIsNotNullWithMultiple
NotEquals now accepts 5 or 6 rows since Calcite may eliminate
redundant IS NOT NULL in SQL validation round-trip
Signed-off-by: Yuanchun Shen <yuanchu@amazon.com>1 parent 4644c5e commit 5ec52c9
21 files changed
Lines changed: 57 additions & 43 deletions
File tree
- core/src/main/java/org/opensearch/sql
- calcite/utils
- expression/function
- integ-test/src/test
- java/org/opensearch/sql/calcite/remote
- resources/expectedOutput
- calcite_no_pushdown
- calcite
- clickbench
- ppl/src/test/java/org/opensearch/sql/ppl/calcite
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 401 | + | |
404 | 402 | | |
405 | 403 | | |
406 | 404 | | |
| |||
433 | 431 | | |
434 | 432 | | |
435 | 433 | | |
436 | | - | |
437 | | - | |
438 | | - | |
| 434 | + | |
439 | 435 | | |
440 | 436 | | |
441 | 437 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
767 | 766 | | |
768 | 767 | | |
769 | 768 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1445 | 1445 | | |
1446 | 1446 | | |
1447 | 1447 | | |
| 1448 | + | |
1448 | 1449 | | |
1449 | 1450 | | |
| 1451 | + | |
1450 | 1452 | | |
1451 | 1453 | | |
1452 | 1454 | | |
| |||
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 111 | + | |
| 112 | + | |
119 | 113 | | |
120 | 114 | | |
121 | 115 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
0 commit comments