[AURON #2304] Add end-to-end IT coverage for composed native Calc predicates and expressions#2306
Merged
Merged
Conversation
Contributor
Author
|
Hi @Tartarus0zm, could you please help review this PR when you get a chance? Thanks! I probably need to do rebase once #2303 is merged. |
Contributor
Tartarus0zm
self-requested a review
June 4, 2026 09:27
…on tests Add end-to-end ITCase coverage to AuronFlinkCalcITCase for operator combinations that convert into a single native Flink Calc: AND/OR of cross-column comparisons and NOT LIKE. Row-set assertions over T1, native-on.
…gration tests Add end-to-end ITCase coverage to AuronCalcRewriteITCase for CASE expressions composed with comparisons: a per-row comparison guard and a multi-branch searched CASE. Row-set assertions over T1, native-on.
Contributor
Author
|
Thanks for the review, @Tartarus0zm! The PR has been updated to resolve the conflicts. |
Tartarus0zm
approved these changes
Jun 5, 2026
Tartarus0zm
left a comment
Contributor
There was a problem hiding this comment.
hi @weiqingy thanks for your contribution!
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2304
Rationale for this change
Several operator combinations convert into a single native Flink Calc now that the expression converters merged (#1859 math, #1860 logical, #1861 comparison/LIKE), but they lacked end-to-end
ITCasecoverage — each composed case could not be tested while its partner operator still fell back, so only the per-operator converter unit tests existed. This adds the missing end-to-end coverage so a regression in the composed native path is caught. Test-only; no production change.What changes are included in this PR?
Five end-to-end
ITCasemethods over the existingT1table, asserting the final row set (native-on):AuronFlinkCalcITCase(compound filters):testFilterAndComparison—where int <> 1 AND ts = '2020-10-10 00:00:02'→[2]testFilterOrComparison—where int = 1 OR ts = '2020-10-10 00:00:03'→[1, 2]testFilterNotLike—where string NOT LIKE 'Comment%'→["Hi"]AuronCalcRewriteITCase(CASE projections):testCaseWhenComparisonGuard—CASE WHEN int > 1 THEN int * 2 ELSE 0 END→[0, 4, 4]testCaseWhenMultipleBranches—CASE WHEN int = 1 THEN 'one' WHEN int > 2 THEN 'big' ELSE 'two' END→["one", "two", "two"]The compound predicates cross two columns deliberately: a same-column compound (e.g.
int > 1 AND int < 5) is folded by Calcite'sRexSimplifyinto a singleSEARCHbefore reaching the converter, so it would not build a nativeAnd/Ornode. String operands use equality (varchar inequalities currently fall back), and the comparisons avoid decimal-literal-vs-DOUBLEforms. Both operands of each compound are load-bearing, so anAND/ORswap changes the asserted row set.Are there any user-facing changes?
No.
How was this patch tested?
These are the tests. The full
auron-flink-plannermodule passes (109/109) with 0 Checkstyle violations. Each new test was confirmed to execute natively during development — the runtime plan dump shows the expected native node (FilterExec [int != 1 AND ts = ...],FilterExec [int = 1 OR ts = ...],FilterExec [NOT string LIKE Comment%], andProjectExec [CASE WHEN ... END]) over the FFI reader, rather than a Flink-codegen fallback.