-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support max on single-level struct in aggregation context #4434
Changes from 1 commit
56fd233
8c5e6de
fbb40d8
a7cd407
332c23b
908097c
4102954
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1695,3 +1695,22 @@ def test_groupby_std_variance_partial_replace_fallback(data_gen, | |||||
exist_classes=','.join(exist_clz), | ||||||
non_exist_classes=','.join(non_exist_clz), | ||||||
conf=local_conf) | ||||||
|
||||||
@ignore_order | ||||||
@pytest.mark.parametrize('data_type', all_gen + [NullGen()], ids=idfn) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
def test_max_single_level_struct(data_type): | ||||||
data_gen = [ | ||||||
('a', StructGen([ | ||||||
('aa', data_type), | ||||||
('ab', data_type)])), | ||||||
('b', IntegerGen())] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we make it likely that b will have repeated data in it? That way the groupings are likely to have more than one thing in them to compare?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done, updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suported both Min and Max. |
||||||
assert_gpu_and_cpu_are_equal_sql( | ||||||
lambda spark : gen_df(spark, data_gen, length=1024), | ||||||
"hash_agg_table", | ||||||
'select b, max(a) from hash_agg_table group by b', | ||||||
_no_nans_float_conf) | ||||||
assert_gpu_and_cpu_are_equal_sql( | ||||||
lambda spark : gen_df(spark, data_gen, length=1024), | ||||||
"hash_agg_table", | ||||||
'select max(a) from hash_agg_table', | ||||||
_no_nans_float_conf) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This says that it works for window operations too, but I see no tests for window operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, removed the window support.