[CALCITE-7432] NumberFormatException when convert NaN literal to sql#4838
Merged
xuzifu666 merged 1 commit intoapache:mainfrom Mar 19, 2026
Merged
[CALCITE-7432] NumberFormatException when convert NaN literal to sql#4838xuzifu666 merged 1 commit intoapache:mainfrom
NaN literal to sql#4838xuzifu666 merged 1 commit intoapache:mainfrom
Conversation
xuzifu666
reviewed
Mar 16, 2026
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
Outdated
Show resolved
Hide resolved
mihaibudiu
approved these changes
Mar 17, 2026
xuzifu666
approved these changes
Mar 17, 2026
xiedeyantu
approved these changes
Mar 17, 2026
Member
xiedeyantu
left a comment
There was a problem hiding this comment.
I only left some comments on coding style.
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
Outdated
Show resolved
Hide resolved
Contributor
|
This has 3 approvals, so after you address the comments and squash the commits let's merge it. |
xuzifu666
reviewed
Mar 18, 2026
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
Show resolved
Hide resolved
|
Member
|
I think we can merge this pr now. |
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.



SqlImplementor.toSqlthrowsNumberFormatExceptionwhen aRexLiteralcontains a NaN or Infinity value, becauseBigDecimalcannot represent IEEE 754 special values. Fix by generatingCAST('NaN' AS <type>)for non-finite doubles instead of callingSqlLiteral.createApproxNumeric.