Skip to content

Conversation

@SkyFan2002
Copy link
Member

@SkyFan2002 SkyFan2002 commented Oct 26, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

This PR improves the runtime filter mechanism with several optimizations to enhance join performance and reduce unnecessary filtering overhead.

Changes

  1. Push down runtime filters to probe key equivalence classes - Extends runtime filter coverage by propagating filters through equivalent expressions, enabling more join scenarios to benefit from early filtering. Performance Optimization: Propagate Runtime Filters Through Join Equivalence Classes #18857

  2. Scan waits for runtime filter construction - Synchronizes table scans with runtime filter generation to ensure filters are applied before reading data, maximizing filtering effectiveness.

  3. Runtime-based filter construction decision - Dynamically determines whether to build runtime filters based on runtime statistics, avoiding overhead when filters provide minimal benefit.

Performance

TPC-DS SF100, Large Warehouse:

Query baseline_time_s new_time_s change_percent
Q93 3.899 2.3 -41.01
Q95 5.431 3.925 -27.73
Q17 5.075 4.135 -18.52
Q34 2.801 2.37 -15.39
Q6 2.754 2.422 -12.06
Q64 11.608 10.34 -10.92

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-feature this PR introduces a new feature to the codebase label Oct 26, 2025
@databendlabs databendlabs deleted a comment from github-actions bot Oct 27, 2025
@SkyFan2002 SkyFan2002 added the ci-cloud Build docker image for cloud test label Oct 28, 2025
@SkyFan2002 SkyFan2002 force-pushed the improve_runtime_filter branch from 4707bac to a8bd6cb Compare October 30, 2025 06:17
@databendlabs databendlabs deleted a comment from github-actions bot Oct 30, 2025
@databendlabs databendlabs deleted a comment from github-actions bot Oct 30, 2025
@SkyFan2002 SkyFan2002 added ci-cloud Build docker image for cloud test and removed ci-cloud Build docker image for cloud test labels Oct 30, 2025
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-18893-dc39b31-1761813262

note: this image tag is only available for internal use.

@SkyFan2002 SkyFan2002 added ci-cloud Build docker image for cloud test and removed ci-cloud Build docker image for cloud test labels Oct 30, 2025
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-18893-920dea5-1761845415

note: this image tag is only available for internal use.

@SkyFan2002 SkyFan2002 added ci-cloud Build docker image for cloud test and removed ci-cloud Build docker image for cloud test labels Oct 31, 2025
@databendlabs databendlabs deleted a comment from github-actions bot Oct 31, 2025
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-18893-5d4ce35-1761897311

note: this image tag is only available for internal use.

@SkyFan2002 SkyFan2002 added the ci-cloud Build docker image for cloud test label Nov 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

Docker Image for PR

  • tag: pr-18893-cd0cd34-1762278275

note: this image tag is only available for internal use.

@SkyFan2002 SkyFan2002 added ci-cloud Build docker image for cloud test and removed ci-cloud Build docker image for cloud test labels Nov 5, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

Docker Image for PR

  • tag: pr-18893-7585e29-1762318811

note: this image tag is only available for internal use.

@databendlabs databendlabs deleted a comment from github-actions bot Nov 5, 2025
@SkyFan2002 SkyFan2002 marked this pull request as ready for review November 5, 2025 09:41
@SkyFan2002 SkyFan2002 changed the title feat: improve runtime filter feat: improve runtime filter [Part 1] Nov 5, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@SkyFan2002 SkyFan2002 marked this pull request as draft November 5, 2025 11:54
@SkyFan2002
Copy link
Member Author

Marked as draft due to some tests failing.

@SkyFan2002 SkyFan2002 marked this pull request as ready for review November 6, 2025 01:00
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2025

🤖 CI Job Analysis

Workflow: 19123759825

📊 Summary

  • Total Jobs: 83
  • Failed Jobs: 1
  • Retryable: 0
  • Code Issues: 1

NO RETRY NEEDED

All failures appear to be code/test issues requiring manual fixes.

🔍 Job Details

  • linux / sqllogic / cluster (tpcds, 2c8g, hybrid): Not retryable (Code/Test)

🤖 About

Automated analysis using job annotations to distinguish infrastructure issues (auto-retried) from code/test issues (manual fixes needed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cloud Build docker image for cloud test pr-feature this PR introduces a new feature to the codebase

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants