1fanwang commented on issue #25766: URL: https://github.com/apache/datafusion/issues/25766#issuecomment-5844015808
#25767 plans INTERSECT ALL and EXCEPT ALL with a grouped count instead of `row_number() OVER (PARTITION BY ..)`. Grouping treats 0.0 and -0.0 as equal, so with that change these return one row each: ```sql SELECT a FROM (VALUES (0.0), (-0.0)) t(a) INTERSECT ALL SELECT a FROM (VALUES (0.0)) s(a); SELECT a FROM (VALUES (0.0), (-0.0)) t(a) EXCEPT ALL SELECT a FROM (VALUES (0.0)) s(a); ``` I checked 1000 random INTERSECT ALL and EXCEPT ALL queries over small DOUBLE tables with duplicates, NULLs, 0.0 and -0.0 against DuckDB 1.4.5. #25767 had no mismatches and #25742 had 237. The window behavior itself is unchanged. `SELECT a, row_number() OVER (PARTITION BY a) FROM (VALUES (0.0), (-0.0)) t(a)` still gives both rows row number 1. So the set operations would no longer depend on this issue, but the issue still stands for windows. -- 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]
