You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/12 10:30:36 UTC

[GitHub] [incubator-doris] xinyiZzz opened a new issue #5225: [BUG] row_number and group by have inconsistent partition results for (0.0, -0.0)

xinyiZzz opened a new issue #5225:
URL: https://github.com/apache/incubator-doris/issues/5225


   **Describe the bug**
   Currently in GroupBy and HashPartition, -0.0 is not equal to 0.0 (determined by the Hash function), so the -0.0 and 0.0 are divided into 2 partitions.
   After sorting the data in row_number, a new partition will be opened when the values ​​of the upper and lower rows are not equal, and Currently 0.0 == -0.0 is true, so 0.0 and -0.0 are divided into the same partition for row_number.
   
   **To Reproduce**
   When A.k1 contains -0.0 and 0.0
   The result of select k1, count(1) from A group by k1 is as follows.
   +------+----------+
   | k1   | count(1) |
   +------+----------+
   |    0 |        2 |
   |   -0 |        1 |
   +------+----------+
   The result of select k1, row_number() over (partition by k1 order by k2) as t from A is as follows. 
   +------+------+
   | k1   | t   |
   +------+------+
   |    0 |    1 |
   |    0 |    2 |
   |   -0 |    3 |
   +------+------+
   
   **Expected behavior**
   We hope to unify the partition results of group by and row_number to 0 and -0, the expected result is
   +------+------+
   | k1   | t   |
   +------+------+
   |    0 |    1 |
   |    0 |    2 |
   |   -0 |    1 |
   +------+------+


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman closed issue #5225: [BUG] row_number and group by have inconsistent partition results for (0.0, -0.0)

Posted by GitBox <gi...@apache.org>.
morningman closed issue #5225:
URL: https://github.com/apache/incubator-doris/issues/5225


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org