-
Notifications
You must be signed in to change notification settings - Fork 121
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
feat: Add q12, q13, q14, q16, q22 #910
Conversation
tpch/queries/q16.py
Outdated
.join(supplier, left_on="ps_suppkey", right_on="s_suppkey", how="left") | ||
.filter(nw.col("ps_suppkey_right").is_null()) | ||
.group_by("p_brand", "p_type", "p_size") | ||
.agg(nw.col("ps_suppkey").unique().len().alias("supplier_cnt")) |
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.
unique().len()
changed from n_unique()
Because AttributeError: 'SeriesGroupBy' object has no attribute 'n_unique'.
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.
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.
I made an attempt in #917, I don't have time to test against the queries right now though π
All works well, except q16 and q22 raise |
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.
thanks @luke396 !
tpch/queries/q16.py
Outdated
.join(supplier, left_on="ps_suppkey", right_on="s_suppkey", how="left") | ||
.filter(nw.col("ps_suppkey_right").is_null()) | ||
.group_by("p_brand", "p_type", "p_size") | ||
.agg(nw.col("ps_suppkey").unique().len().alias("supplier_cnt")) |
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.
As observed in #918, we have remove (Not sure if this is appreciated.) |
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.
awesome, thanks so much @luke396 !
yeah I cut down a bit on what gets executed to save some time (as you can intuit, I'm a bit impatient with waiting for things to run π )
What type of PR is this? (check all applicable)
Related issues
Checklist
If you have comments or can explain your changes, please do so below.
Not done for now, some fix needed.