question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add support for dynamic filtering

See original GitHub issue

fact_table - large fact table, partitioned on date_key d_date - small dimension table, with significant correlation on it’s columns and date_key.

Currently for the following query:

SELECT 
    count(*)
FROM 
    fact_table a 
JOIN d_date b 
ON a.date_key = b.date_key 
WHERE 
    b.year = 2017;

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 matching b.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:

SELECT 
    count(*)
FROM 
    fact_table a 
JOIN d_date b 
ON a.date_key = b.date_key 
WHERE a.date_key IN (20170101,20170102, etc...)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:6
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
himanshukhantwalcommented, Feb 8, 2020

@maciejgrzybek @arhimondr Do we know if anyone working on this feature? Thanks!

1reaction
arhimondrcommented, Feb 25, 2019

@tastyqbit Presto Foundation actively works on getting this feature in (https://github.com/prestosql/presto/pull/91). Once it is there - we will cherry-pick it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic filtering — Trino 403 Documentation
Dynamic filtering is supported when the join key contains a cast from the build key type to the probe key type. Dynamic filtering...
Read more >
Dynamic Pages Get a Boost with Dynamic Filters
You can apply the dynamic filter to every collection-supported widget you add to dynamic pages. This includes gallery, table, list, ...
Read more >
Create a dynamic filter option - ServiceNow Docs
Dynamic filter options enhance filtering by allowing users to run existing script includes or JavaScript against a reference field within ...
Read more >
Add dynamic filtering to your interactive JIRA Dashboard
Add new Dynamic filters based on the fields: Assignee, Priority, Status, Labels and Summary. Open/refresh the dashboard you already have and which is...
Read more >
Amazon Personalize now supports dynamic filters for applying ...
This blog post was last reviewed or updated April, 2022 with database schema updates. We're excited to announce dynamic filters in Amazon ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found