Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logictest: debug distsql_stats failure involving virtual columns #121584

Closed
wants to merge 1 commit into from

Conversation

michae2
Copy link
Collaborator

@michae2 michae2 commented Apr 2, 2024

This failure happens when we plan the query without stats. Add a SHOW HISTOGRAM to make sure we've got the right stats ready to go.

Informs: #121424

Release note: None

This failure happens when we plan the query without stats. Add a SHOW
HISTOGRAM to make sure we've got the right stats ready to go.

Informs: cockroachdb#121424

Release note: None
@michae2 michae2 requested review from yuzefovich and a team April 2, 2024 22:21
@cockroach-teamcity
Copy link
Member

This change is Reviewable

virt {o} 1000 33 true

let $hist_o
SELECT histogram_id FROM [SHOW STATISTICS FOR TABLE mno]
Copy link
Member

Choose a reason for hiding this comment

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

I'm somewhat sceptical that this addition will help in understanding the failure. What are the reasons for "missing stats" during the planning? We already checked in the query above that there are some stats on columns m, n, and o, so the stats do get collected and written down into the system table, and we're just not using them during planning for some reason. If the histogram for o got busted, then I'd have expected that we'd still use stats on n.

nit: also EXPLAIN plans should be in execbuilder tests.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good points. I'll close this.

@michae2 michae2 closed this Apr 3, 2024
@michae2 michae2 deleted the b121424 branch April 3, 2024 01:06
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants