You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "pepijnve (via GitHub)" <gi...@apache.org> on 2025/11/06 20:27:22 UTC
Re: [PR] #17801 Improve nullability reporting of case expressions [datafusion]
pepijnve commented on PR #17813:
URL: https://github.com/apache/datafusion/pull/17813#issuecomment-3499267271
The test failures are now cause by the optimizer rewriting queries like
```
SELECT ALL (+ (+ CASE - 54 WHEN COUNT(*) + - COUNT(*) THEN NULL ELSE - 46 + - 59 END)) * COUNT(*);
```
In the original version the case nullability logic can't evaluate the 'when' expressions due the presence of `count(*)`. This causes the expression to be marked as nullable.
The optimiser ends up eliminating the `count(*)` and eventually the case nullability logic does say the expression is not nullable.
Since `<TYPE> NOT NULL` is strict subset of `<TYPE>`, I'm wondering if that schema change should actually be allowed to pass.
--
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