You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "mikamikasuki (via GitHub)" <gi...@apache.org> on 2026/10/05 08:44:14 UTC
[PR] fix: preserve types in NVL and IFNULL [datafusion]
mikamikasuki opened a new pull request, #26047:
URL: https://github.com/apache/datafusion/pull/26047
## Which issue does this PR close?
- Closes #25947
## Rationale for this change
NVL and IFNULL could coerce DECIMAL values to Float64, losing precision, and DATE/TIMESTAMP values to Utf8. This differs from COALESCE and prevents type-specific operations such as timestamp arithmetic.
## What changes are included in this PR?
- Use COALESCE's common-type resolution for NVL and IFNULL.
- Preserve the existing Boolean result for all-NULL calls and Boolean-to-numeric fallback behavior.
- Add SQL logic tests for decimal types and precision, date/timestamp types, and timestamp arithmetic.
## What is the testing strategy for this PR?
- NVL SQL logic tests, including the existing IFNULL numeric-fallback case.
- Full extended workspace tests passed.
- cargo fmt --all -- --check
- cargo clippy --all-targets --all-features -- -D warnings
## Are there any user-facing changes?
NVL and IFNULL preserve decimal, date, and timestamp types instead of converting them to Float64 or Utf8.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: preserve types in NVL and IFNULL [datafusion]
Posted by "mikamikasuki (via GitHub)" <gi...@apache.org>.
mikamikasuki closed pull request #26047: fix: preserve types in NVL and IFNULL
URL: https://github.com/apache/datafusion/pull/26047
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] fix: preserve types in NVL and IFNULL [datafusion]
Posted by "mikamikasuki (via GitHub)" <gi...@apache.org>.
mikamikasuki commented on PR #26047:
URL: https://github.com/apache/datafusion/pull/26047#issuecomment-5999495725
Closing this as a duplicate of #25964, which addresses the same NVL/IFNULL type coercion issue and includes coverage for decimal precision, temporal types, and existing coercion behavior.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org