[AURON #1579] Fix and enhance nvl2 unit test#1635
Merged
richox merged 1 commit intoapache:masterfrom Nov 22, 2025
Merged
Conversation
…was fundamentally wrong)
ShreyeshArangath
approved these changes
Nov 20, 2025
Contributor
richox
approved these changes
Nov 22, 2025
yew1eb
added a commit
to yew1eb/auron
that referenced
this pull request
Nov 25, 2025
…was fundamentally wrong) (apache#1635)
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 #1579 .
Rationale for this change
nvl2(expr1, expr2, expr3)semantics:The original nvl2 test was incorrect and asserted the wrong expected result:
sql( "create table t1 using parquet as select 'base'" + " as base, 3 as exponent") val functions = """ |select | nvl2(null, base, exponent), nvl2(4, base, exponent) |from t1 """.stripMargin val df = sql(functions) checkAnswer(df, Seq(Row("base", 3))) // ← WRONG!Original test incorrectly expected Row("base", 3) but actual result is Row(3, "base").
What changes are included in this PR?
Are there any user-facing changes?
No.
How was this patch tested?
Unit tests passed.