cloudberry
cloudberry copied to clipboard
Push the runtime filter from hashjoin to seqscan or AM.
Change logs If gp_enable_runtime_filter_pushdown is on, something will run during query:
- In ExecInitHashJoin(), try to find the direct mapper between var in hashclauses and var in seqscan. If found we will save the mapper in AttrFilter and all AttrFilters will be pushed to hash node.
- During building hash table we will create the range/bloom filters in AttrFilter. These filters will be converted to the list of ScanKey and pushed to Seqscan once completed.
- If AM support SCAN_SUPPORT_RUNTIME_FILTER, these ScanKeys will be pushed down to the AM module further, otherwise will be used to filter slot in Seqscan;
Why are the changes needed? The commit may improve the performance of query including hashjoin.
Does this PR introduce any user-facing change? No.
How was this patch tested? Yes, add test cases in src/test/regress/sql/gp_runtime_filter.sql
Contributor's Checklist Here are some reminders and checklists before/when submitting your pull request, please check them:
- [ ] Make sure your Pull Request has a clear title and commit message. You can take git-commit template as a reference.
- [ ] Sign the Contributor License Agreement as prompted for your first-time contribution(One-time setup).
- [ ] Learn the coding contribution guide, including our code conventions, workflow and more.
- [ ] List your communication in the GitHub Issues or Discussions (if has or needed).
- [ ] Document changes.
- [ ] Add tests for the change
- [ ] Pass make installcheck
- [ ] Pass make -C src/test installcheck-cbdb-parallel
- [ ] Feel free to request cloudberrydb/dev team for review and approval when your PR is ready🥳
Close the PR since no response for a long time.