raghavyadav01 commented on issue #21198: URL: https://github.com/apache/datafusion/issues/21198#issuecomment-6485710600
@neilconway are you still working on this? If not, could I pick it up? On main this doesn't fail, it returns wrong rows: an inner `LATERAL` with `HAVING` keeps the outer rows that fail the `HAVING`, with `NULL`. ```sql CREATE TABLE a(k INT) AS VALUES (1), (2), (3); CREATE TABLE b(k INT, v INT) AS VALUES (1, 10), (1, 20), (2, 30); SELECT a.k, s.c FROM a, LATERAL (SELECT count(*) AS c FROM b WHERE b.k = a.k HAVING count(*) > 1) s; -- main: (1, 2), (2, NULL), (3, NULL) -- DuckDB: (1, 2) ``` Following https://github.com/apache/datafusion/issues/5492#issuecomment-6479090126, the fix would be to make this shape error rather than support it. -- 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]
