raghavyadav01 commented on PR #26942: URL: https://github.com/apache/datafusion/pull/26942#issuecomment-6549355473
Checked this against DuckDB 1.5.6 with a few more shapes (x(a) = 1..4, y(a, b) = (1,10), (1,5), (3,NULL), (4,7)): - `sum(y.b)` with `HAVING sum(y.b) IS NULL`, also with `AS s`: main returns 15 and 7 for a = 1 and 4, DuckDB returns NULL. Now errors. - `sum(y.b)` with `HAVING count(*) < 2`: main returns 15 for a = 1, DuckDB returns NULL. Now errors too. Might be worth adding, since the HAVING reads a different aggregate than the output. - `count(*)`, `count(*) AS c`, `count(*) + 1` and `count(y.b)` outputs with a HAVING that is true on empty input, `coalesce(sum(y.b), 0)` with `HAVING sum(y.b) IS NULL`, a HAVING that is false on empty input, and the subquery in WHERE: same rows as main, and they match DuckDB. So nothing that worked before is rejected now. Looks good to me. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
