Skip to content

Conversation

@srh
Copy link

@srh srh commented Nov 27, 2024

The Count GroupsAccumulator actually can't be made with PrimitiveGroupsAccumulator, and making an adapted version of PrimitiveGroupsAccumulator was sufficiently annoying, that a backported version of CountGroupsAccumulator as we have here works well enough.

*x = (*x).max(y);
},
)
.with_starting_value(<$T as ArrowPrimitiveType>::Native::MIN),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Cubestore running on the upstream DF branch we do see this issue with groups accumulators and different behavior with regular accumulators.

mysql> SELECT MAX(column3) FROM (VALUES (1, 2, NULL), (4, 5, '-Infinity'::double precision));
+--------------+
| max(column3) |
+--------------+
| -inf         |
+--------------+
1 row in set (0.00 sec)

mysql> SELECT MAX(column3) FROM (VALUES (1, 2, NULL), (1, 5, '-Infinity'::double precision)) GROUP BY column1;
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| max(column3)                                                                                                                                                                                                                                                                                                           |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)

@srh srh merged commit 8d4663b into cube Nov 27, 2024
13 of 15 checks passed
@srh srh deleted the groups-accumulator-primitive-other-types branch November 27, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants