Skip to content

[AURON #1708] Fix spark_normalize_nan_and_zero None#1709

Merged
cxzl25 merged 1 commit intoapache:masterfrom
cxzl25:auron_1708
Dec 11, 2025
Merged

[AURON #1708] Fix spark_normalize_nan_and_zero None#1709
cxzl25 merged 1 commit intoapache:masterfrom
cxzl25:auron_1708

Conversation

@cxzl25
Copy link
Contributor

@cxzl25 cxzl25 commented Dec 8, 2025

Which issue does this PR close?

Closes #1708

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

  1. Add UT
  2. SQL validation in production environment

@github-actions github-actions bot added the native label Dec 8, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the spark_normalize_nan_and_zero function would fail when encountering null Float32/Float64 scalar values. The fix adds explicit handling for None values to return them as-is, aligning with Spark's behavior and the function's existing array handling logic which already supports null values within arrays.

Key Changes:

  • Added None value handling for Float32 and Float64 scalar inputs
  • Updated error message to reflect None support
  • Added comprehensive unit tests for null scalar handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@richox
Copy link
Contributor

richox commented Dec 11, 2025

LGTM

@cxzl25 cxzl25 merged commit 59261a0 into apache:master Dec 11, 2025
104 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

spark_normalize_nan_and_zero only supports non-null Float32/Float64 scalars or Float32/Float64 arrays, not: Float64

3 participants