You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "findepi (via GitHub)" <gi...@apache.org> on 2025/03/24 10:22:11 UTC
[I] Regression: eager evaluation of expressions inside CASE conditional expression [datafusion]
findepi opened a new issue, #15384:
URL: https://github.com/apache/datafusion/issues/15384
### Describe the bug
`CASE` sometimes eagerly evaluates the "then" or "else" branches.
### To Reproduce
```sql
SELECT v, CASE WHEN v < 0 THEN 1/0 ELSE 1 END
FROM (VALUES (1), (2)) t(v)
```
### Expected behavior
In DataFusion 44 this query run successfully
```
> SELECT v, CASE WHEN v < 0 THEN 1/0 ELSE 1 END
FROM (VALUES (1), (2)) t(v);
+---+---------------------------------------------------------------------+
| v | CASE WHEN t.v < Int64(0) THEN Int64(1) / Int64(0) ELSE Int64(1) END |
+---+---------------------------------------------------------------------+
| 1 | 1 |
| 2 | 1 |
+---+---------------------------------------------------------------------+
2 row(s) fetched.
```
### Additional context
`45.0.0` is the first version affected.
--
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.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: [I] Regression: eager evaluation of expressions inside CASE conditional expression [datafusion]
Posted by "findepi (via GitHub)" <gi...@apache.org>.
findepi commented on issue #15384:
URL: https://github.com/apache/datafusion/issues/15384#issuecomment-2747848553
Reverting https://github.com/apache/datafusion/pull/13953 would fix the regression.
--
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: [I] Regression: eager evaluation of expressions inside CASE conditional expression [datafusion]
Posted by "findepi (via GitHub)" <gi...@apache.org>.
findepi closed issue #15384: Regression: eager evaluation of expressions inside CASE conditional expression
URL: https://github.com/apache/datafusion/issues/15384
--
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