Skip to content

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

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

feat(query): use cluster keys in DPhyp join costing#19941
forsaken628 wants to merge 11 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
@zhang2014 zhang2014 added the ci-benchmark Benchmark: run all test label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docker Image for PR

  • tag: pr-19941-ffd1ffd-1781073655

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

@zhang2014 zhang2014 added ci-benchmark Benchmark: run all test and removed ci-benchmark Benchmark: run all test labels Jun 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docker Image for PR

  • tag: pr-19941-84c4dbc-1781417721

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

@forsaken628 forsaken628 added ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits and removed ci-benchmark Benchmark: run all test labels Jun 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Docker Image for PR

  • tag: pr-19941-ff849bd-1781492395

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

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

🤖 CI Job Analysis

Workflow: 27525191088

📊 Summary

  • Total Jobs: 88
  • 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 / PROXY routing benchmark (statistics): 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-benchmark-cloud Benchmark: run only cloud tests for tpch/hits 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