Skip to content

feat(query): use cluster keys in DPhyp join costing#19941

Open
forsaken628 wants to merge 9 commits into
databendlabs:mainfrom
forsaken628:histogram-stat
Open

feat(query): use cluster keys in DPhyp join costing#19941
forsaken628 wants to merge 9 commits into
databendlabs:mainfrom
forsaken628:histogram-stat

Conversation

@forsaken628

@forsaken628 forsaken628 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

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

Summary

  • Carry cluster-key expressions through optimizer statistics so scan/filter/limit/join-derived stats can expose usable cluster-key order.
  • Add cluster-key-aware DPhyp join costing for probe-side join keys, including expression cluster keys.

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 Jun 1, 2026
Comment thread src/query/sql/tests/it/optimizer/cluster_key_join_order.txt
@forsaken628 forsaken628 marked this pull request as ready for review June 4, 2026 05:20

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

Copy link
Copy Markdown

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.

Reviewed commit: 4a30841100

ℹ️ 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".

Comment thread src/query/sql/src/planner/optimizer/statistics/collect_statistics.rs Outdated
@forsaken628 forsaken628 requested a review from zhang2014 June 5, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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