[fix](doc) log10.md: NaN / 0 / negative inputs return NULL, not NaN#3809
Open
boluor wants to merge 1 commit into
Open
[fix](doc) log10.md: NaN / 0 / negative inputs return NULL, not NaN#3809boluor wants to merge 1 commit into
boluor wants to merge 1 commit into
Conversation
…t NaN
Both the EN page (in the example block) and both pages (in the return-
value spec) claimed that log10 of NaN returns NaN. On Apache Doris
4.1.1 the cluster actually returns NULL for log10 of NaN, log10 of 0,
and log10 of negative numbers. Update:
- EN: change the example's expected output `NaN` -> `NULL`.
- EN + ZH: rewrite the return-value bullet to cover NaN / zero /
negative all returning NULL.
Verified on the cluster:
log10(cast('nan' as double)) -> NULL
log10(0.0) -> NULL
log10(-1) -> NULL
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Doc page (4.x): `scalar-functions/numeric-functions/log10.md` (EN + ZH).
Both pages claimed in their Return Value section, and the EN page additionally claimed in its example block, that `log10(NaN)` returns `NaN`. On Apache Doris 4.1.1 the cluster actually returns `NULL`. The same applies to `log10(0)` and `log10()`.
Update:
Verification
```
mysql> select log10(cast('nan' as double)); -- NULL
mysql> select log10(0.0); -- NULL
mysql> select log10(-1); -- NULL
mysql> select cast('nan' as double); -- NaN (the cast itself preserves NaN; log10 consumes it and returns NULL)
```
Test plan
🤖 Generated with Claude Code