-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: panic: ReturnType called on TypedExpr with empty typeAnnotation #36036
Comments
Smaller repro:
|
It looks to me like subqueries aren't properly handled by the column backfiller. Kind of messy. I think what should be happening here is that subqueries should be replaced ahead of time, before the backfiller runs - but no code is doing that. Hmm... |
We also incorrectly allow
We just don't check the validity of computed columns during ALTER, only CREATE TABLE. |
@vivekmenezes would you say that as a short-term fix for this issue we could ban subqueries within |
I'm fixing it. It's not just a subqueries thing. |
36518: sql: validate computed columns during ALTER TABLE r=vivekmenezes a=mjibson Previously these were only validated during CREATE, allowing the creation of incorrect columns. validateComputedColumn has removed its dependency on the tree.CreateTable struct so that the alter code can use it. Because of this, all FKs must be computed prior to the computed validate checks. Fixes #36036 Release note (bug fix): Correctly validate computed columns during ALTER TABLE ADD COLUMN. Co-authored-by: Matt Jibson <[email protected]>
The text was updated successfully, but these errors were encountered: