Commit 74cdf9e
authored
Fix CalcitePPLAggregationIT on the analytics-engine route (parquet testSimpleCount0 + APPROX_COUNT_DISTINCT name) (#5525)
* Use a parquet-backed index in CalcitePPLAggregationIT.testSimpleCount0
A bare auto-created index isn't composite/parquet-backed, so on the analytics-engine
route it doesn't route to the analytics engine. Switch to TEST_INDEX_BANK (loaded via
loadIndex, which injects parquet settings when the flag is set, 7 docs) so the test is
meaningful on both routes. Diagnosis by Sandesh Kumar.
Signed-off-by: Kai Huang <ahkcs@amazon.com>
* Emit APPROX_COUNT_DISTINCT as the distinct_count_approx runtime name
distinct_count_approx() failed to bind on the analytics-engine (DataFusion) route
because the SqlAggFunction was named DISTINCT_COUNT_APPROX; the backend resolves
aggregates by the Calcite/Substrait-standard name APPROX_COUNT_DISTINCT. The Java
field name and PPL function name are unchanged. The OpenSearch V3 path is unaffected
(it overrides this via the external HLL registration). Analytics-route binding is
completed by opensearch-project/OpenSearch#22013. Per Sandesh Kumar.
Signed-off-by: Kai Huang <ahkcs@amazon.com>
---------
Signed-off-by: Kai Huang <ahkcs@amazon.com>1 parent 9a32644 commit 74cdf9e
2 files changed
Lines changed: 6 additions & 11 deletions
File tree
- core/src/main/java/org/opensearch/sql/expression/function
- integ-test/src/test/java/org/opensearch/sql/calcite/remote
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
| 524 | + | |
| 525 | + | |
525 | 526 | | |
526 | 527 | | |
527 | 528 | | |
| |||
Lines changed: 4 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
63 | 57 | | |
64 | | - | |
| 58 | + | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
0 commit comments