Skip to content

[AURON #1579]Implement native function of isnan(87),nv2(83) ,nvl(82) #1579#1581

Closed
guixiaowen wants to merge 3 commits intoapache:masterfrom
guixiaowen:addnvl2
Closed

[AURON #1579]Implement native function of isnan(87),nv2(83) ,nvl(82) #1579#1581
guixiaowen wants to merge 3 commits intoapache:masterfrom
guixiaowen:addnvl2

Conversation

@guixiaowen
Copy link
Contributor

@guixiaowen guixiaowen commented Nov 2, 2025

Which issue does this PR close?

Closes #1579 1579

Rationale for this change

Convert Spark's built-in function isnan to execute as a native function.
Convert Spark's built-in function nvl2 to execute as a native function.
Convert Spark's built-in function nvl to execute as a native function.

Spark function name:
isnan
nvl2
nvl

Method description:

isnan(expr) - Returns true if expr is NaN, or false otherwise.
nvl2(expr1, expr2, expr3) - Returns expr2 if expr1 is not null, or expr3 otherwise.

Examples:

SELECT isnan(cast('NaN' as double));
true
SELECT nvl2(NULL, 2, 1);
1
SELECT nvl(NULL, array('2'));
["2"]

What changes are included in this PR?

The Spark built-in function nvl2 is converted to
f::math::isnan(),
f::core::nvl2()
f::core::nvl()

Are there any user-facing changes?

How was this patch tested?

UT

@guixiaowen guixiaowen marked this pull request as draft November 2, 2025 11:59
@guixiaowen guixiaowen changed the title [AURON #1579]Implement native function of nv2(83) #1579 [AURON #1579]Implement native function of isnan(87),nv2(83) ,nvl(82) #1588 Nov 3, 2025
@guixiaowen guixiaowen changed the title [AURON #1579]Implement native function of isnan(87),nv2(83) ,nvl(82) #1588 [AURON #1579]Implement native function of isnan(87),nv2(83) ,nvl(82) #1579 Nov 3, 2025
# Conflicts:
#	native-engine/auron-serde/proto/auron.proto
#	spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronFunctionSuite.scala
@guixiaowen guixiaowen marked this pull request as ready for review November 3, 2025 11:50
@guixiaowen guixiaowen closed this Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement native function of nv2(83)

1 participant