Skip to content

Feat: to_json Infinity/-Infinity Nan values support#3875

Open
kazantsev-maksim wants to merge 36 commits intoapache:mainfrom
kazantsev-maksim:to_json_infinity_nan_support
Open

Feat: to_json Infinity/-Infinity Nan values support#3875
kazantsev-maksim wants to merge 36 commits intoapache:mainfrom
kazantsev-maksim:to_json_infinity_nan_support

Conversation

@kazantsev-maksim
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #3016

Rationale for this change

What changes are included in this PR?

How are these changes tested?

Tested with existing unit tests

@kazuyukitanimura
Copy link
Copy Markdown
Contributor

I think we need add new tests for +/- inf and NaN

@kazantsev-maksim
Copy link
Copy Markdown
Contributor Author

Test failed because since Spark 4.0.0 to_json use runtime expression replacement: https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala#L418

Kazantsev Maksim added 2 commits April 3, 2026 21:34
@kazantsev-maksim
Copy link
Copy Markdown
Contributor Author

kazantsev-maksim commented Apr 3, 2026

I marked sql-tests as ignored until to_json will not support Spark 4.0.0. CC @andygrove

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: to_json does not support +Infinity, -Infinity for numeric types

3 participants