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
Dynamic filtering #52
Comments
@sopel39 I would like to pick up the work of merging dynamic filtering from where @amoghmargoor last left it. I will raise the PR again by rebasing original one. Can this issue be assigned to me ? |
I think we should pick up from prestodb/presto#11604 instead |
|
Opened PR #1072 for implementing dynamic partition pruning in hive connector. |
Fixed via: #1072 |
🎉 🚀 |
Hi all, I have encountered an issue using dynamic filtering and passing a list/tuple into the where clause, and I am not very experienced in python so please help me. I am using conn_hms = trino.dbapi.connect to HMS table, and I define the read function below:
so i will pass in start/end day, sf, and query into the sql later (query parameter is the list/tuple i want to filter in sql)
Until the point i make query a list/ tuple, this works, but now they are returning syntex error like "TrinoUserError: TrinoUserError(type=USER_ERROR, name=SYNTAX_ERROR, message="line 14:27: mismatched input 'in'. Expecting: 'AND', 'EXCEPT', 'FETCH', 'GROUP', 'HAVING', 'INTERSECT', 'LIMIT', 'OFFSET', 'OR', 'ORDER', 'UNION', 'WINDOW', ", query_id=20220228_004211_00817_et3jr)". Could you please help me on this? |
Related video: https://www.youtube.com/watch?v=-2SjSM73l8g Use PRs: https://github.com/trinodb/trino/pulls?page=9&q=is%3Apr+is%3Aclosed+dynamic+filter |
fact_table
- large fact table, partitioned ondate_key
d_date
- small dimension table, with significant correlation on it's columns anddate_key
.Currently for the following query:
larger probe table is fully scanned. When presto after scaning build table (right) could extract information that for
b.year = 2017
there are only small number of matchingb.date_key
values. This information could be used to narrow down the table scan. In other words, above query could be dynamically "rewritten" to equivalent of:Design doc: https://docs.google.com/document/d/1TOlxS8ZAXSIHR5ftHbPsgUkuUA-ky-odwmPdZARJrUQ/edit
The text was updated successfully, but these errors were encountered: