-
Notifications
You must be signed in to change notification settings - Fork 3k
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 pushing down grouping keys with function #9067
Comments
|
Hi @assaf2 thanks for the hard work! Changes I tried: https://gist.github.com/jerryleooo/b2b92c2ce04a8ef78bfbb7e7ddc9a8f2 |
When the rule |
Hi, @jerryleooo. I'm trying similar things with PostgreSQL connector. Specifically we can follow implementation in |
These tests are done on PostgreSQL connector with TPC-H data.
Trino query:
SELECT lower(o_clerk), SUM(o_totalprice) FROM orders GROUP BY LOWER(o_clerk);
Generated PostgreSQL query:
SELECT "o_totalprice", "o_clerk" FROM "public"."orders"
(full table scan)Trino query:
SELECT o_clerk, SUM(o_totalprice) FROM orders GROUP BY o_clerk;
Generated PostgreSQL query:
SELECT "o_clerk", "_pfgnrtd_0" FROM (SELECT "o_clerk", sum("o_totalprice") AS "_pfgnrtd_0" FROM "public"."orders" GROUP BY "o_clerk") o
(aggregation can be pushed down)Not sure if this belongs to #7994
The text was updated successfully, but these errors were encountered: