Skip to content

Conversation

@forsaken628
Copy link
Collaborator

@forsaken628 forsaken628 commented Dec 19, 2025

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

Summary

  • The ndv should be less than cardinality.
  • No longer use cardinality as ndv when column stats are missing, to prevent extremely low selectivity from being derived.
  • Adjust the display order of join children in the logical plan, i.e., build is on top and probe is on the bottom, to be consistent with other places.

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-chore this PR only has small changes that no need to record, like coding styles. label Dec 19, 2025
@forsaken628 forsaken628 force-pushed the ndv branch 2 times, most recently from b491c50 to 8962968 Compare December 20, 2025 01:47
@forsaken628 forsaken628 added the ci-benchmark-cloud Benchmark: run only cloud tests for tpch/hits label Dec 21, 2025
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-19133-043850e-1766343509

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

@zhang2014 zhang2014 added the ci-cloud Build docker image for cloud test label Dec 22, 2025
@forsaken628 forsaken628 changed the title chore: ndv chore: ndv upper cutoff Dec 22, 2025
│ │ │ │ └── Scan: default.tpch_test.region (#5) (read rows: 5)
│ │ │ └── Probe
│ │ │ └── Scan: default.tpch_test.nation (#4) (read rows: 25)
│ │ │ └── Scan: default.tpch_test.region (#5) (read rows: 5)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Q5 has unintended join order changes, and Q8 has optimizations.

@forsaken628 forsaken628 marked this pull request as ready for review December 22, 2025 08:42
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-19133-d8a8d63-1766392881

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

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

@zhang2014 zhang2014 added ci-cloud Build docker image for cloud test and removed ci-cloud Build docker image for cloud test labels Dec 24, 2025
@github-actions
Copy link
Contributor

Docker Image for PR

  • tag: pr-19133-310aca1-1766588133

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

@zhang2014 zhang2014 merged commit 3cbc950 into databendlabs:main Dec 25, 2025
86 checks passed
@forsaken628 forsaken628 deleted the ndv branch December 26, 2025 02:12
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 ci-cloud Build docker image for cloud test pr-chore this PR only has small changes that no need to record, like coding styles.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants