You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cd datafusion-cli
RUST_LOG=debug cargo run -- -c "create or replace table foo(x decimal(10,3), y int) as values (10.0, 100), (21.2, 200), (33.0, 300); select count(*) from foo group by x, y";
You should not see any lines about Creating GroupValuesRows . Here is what is printed out on main
@alamb For this pr, will it need its own custom column implementation for decimal128 instead of instantiate_primitive!, similar to how byte, byteview, stringview, etc. are dealt with? I am thinking that due to the parameters
Is your feature request related to a problem or challenge?
In #12269 @jayzhan211 made significant improvements to how group values are stored in multi-column aggregations.
Specifically for queries like
The improvement relies on implementing specialized versions of
GroupColumn
for the types ofcol1
,colN
We have implemented the primitive types and Strings/StringViews now, but we have not implemented all types
This means queries like
Will fall back to the slower (but general)
GroupValuesRows
:datafusion/datafusion/physical-plan/src/aggregates/group_values/row.rs
Lines 40 to 41 in a6586cc
Describe the solution you'd like
Implement
GroupColumn
forDecimal128
types.You can see how to do this here:
datafusion/datafusion/physical-plan/src/aggregates/group_values/mod.rs
Lines 117 to 121 in e4bd579
@jonathanc-n also made a really nice PR here
GroupColumn
) forDate/Time/Timestamp
types #13457 (comment)and the make sure there are tests for each of those types in queries that group on multiple columns
Describe alternatives you've considered
No response
Additional context
Here is an example for how this was done for Strings: #12809
The text was updated successfully, but these errors were encountered: