-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
bugfix: don't panic when missing schema information #14787
bugfix: don't panic when missing schema information #14787
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
{ | ||
"comment": "We need schema tracking to allow unexpanded columns inside UNION", | ||
"query": "select x from (select t.*, 0 as x from user t union select t.*, 1 as x from user_extra t) AS t", | ||
"plan": "VT09015: schema tracking required" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this error is not going to happen when schema tracking is disabled but authoritative column data is provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is the short hand info that we provide in the error message. In the manual we add a little more detail:
VT09015
This query cannot be planned without more information on the SQL schema. Please turn on schema tracking or add authoritative columns information to your VSchema.
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Andres Taylor <[email protected]>
d11206c
to
4c4357a
Compare
Signed-off-by: Eduardo J. Ortega U. <[email protected]>
Description
When schema tracking is not enabled, column information can be missing for unexpanded derived tables, which leads to the planner not being able to figure out types and dependencies.
Before this change, the semantic analyser would panic on these queries. This change makes it return an error instead.
Related Issue(s)
Fixes #14788