You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-52873][SQL][TESTS][FOLLOWUP] Fix test for non-ansi mode
### What changes were proposed in this pull request?
In the `JoinSuite` test expecting `ignoreDuplicateKey=true`, don't include a query where a build-side key is a string used in a numeric expression.
### Why are the changes needed?
In non-ansi mode, casting of the string `t2.c1` to use in a numeric expression (`t2.c1 * 1000`) adds extra scaffolding around that expression in the build keys, but not in the condition. In the condition, `t2.c1 * 1000` is
`(cast(c1#299 as double) * 1000.0`
but in the build key, it is
`knownfloatingpointnormalized(normalizenanandzero((cast(c1#299 as double) * 1000.0)`
As a result, `t2.c1 * 1000` doesn't match between the build keys and the condition. Therefore, the optimization is not performed, and since the test checks for the optimization, the test fails in non-ansi mode.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Manually ran the offending test both with and without `SPARK_ANSI_SQL_MODE=false`.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes#52128 from bersprockets/broken_nonansi_test.
Authored-by: Bruce Robbins <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
(cherry picked from commit 20a6af7)
Signed-off-by: Dongjoon Hyun <[email protected]>
0 commit comments