-
Notifications
You must be signed in to change notification settings - Fork 181
Description
Describe the bug
The CrossClusterSearchIT test class contains tests for PPL commands that are only supported when the Calcite engine is enabled, but the test class does not enable Calcite. Since PPLIntegTestCase.init() calls disableCalcite() by default, these tests will fail or produce incorrect results by falling back to v2.
Affected Tests Using Calcite-Only Commands
The following tests use commands that throw getOnlyForCalciteException in Analyzer.java:
-
testCrossClusterAddTotals(line 250-259)- Uses
addtotalscommand (Calcite-only perAnalyzer.java:531)
- Uses
-
testCrossClusterAddColTotals(line 261-273)- Uses
addcoltotalscommand (Calcite-only perAnalyzer.java:536)
- Uses
-
testCrossClusterTranspose(line 275-291)- Uses
transposecommand (Calcite-only perAnalyzer.java:716)
- Uses
-
testCrossClusterAppend(line 293-303)- Uses
appendcommand (Calcite-only perAnalyzer.java:863) - Note: Comment on line 295 says "TODO: We should enable calcite by default in CrossClusterSearchIT?"
- Uses
-
testCrossClusterMvcombine(line 305-322)- Uses
mvcombinecommand (Calcite-only perAnalyzer.java:541)
- Uses
Root Cause
CrossClusterSearchIT extends PPLIntegTestCase, which calls disableCalcite() in its init() method (line 49 of PPLIntegTestCase.java). The test class does not override this behavior by calling enableCalcite().
Code References
- Test file:
integ-test/src/test/java/org/opensearch/sql/security/CrossClusterSearchIT.java - Calcite-only exceptions:
core/src/main/java/org/opensearch/sql/analysis/Analyzer.java - Base test class:
integ-test/src/test/java/org/opensearch/sql/ppl/PPLIntegTestCase.java:49
Related CI Run
https://github.com/opensearch-project/sql/actions/runs/21467507458/job/61834137243?pr=4892
OpenSearch Version
Main branch (3.5)
Relevant log output
No response