xiedeyantu commented on PR #21715:
URL: https://github.com/apache/datafusion/pull/21715#issuecomment-4276120499

   > Thanks @xiedeyantu. While this fixes the original issue, it now treats all 
nulls as different when aggregating, which I don't think is correct. For 
example:
   > 
   > ```sql
   > CREATE TABLE t(a INT, b INT, c INT, UNIQUE(a));
   > INSERT INTO t VALUES (1, 10, 100), (NULL, 20, 200), (NULL, 30, 300);
   > SELECT a, SUM(c) AS total FROM t GROUP BY a;
   > +------+-------+
   > | a    | total |
   > +------+-------+
   > | 1    | 100   |
   > | NULL | 200   |
   > | NULL | 300   |
   > +------+-------+
   > ```
   
   @nuno-faria Thank you for your comprehensive analysis. I have refactored the 
code and added the test cases you provided; please review it again.


-- 
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]

Reply via email to