-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: CTE name resolution can't pass through VALUES or UNION clauses #22418
Comments
Documented as a known limitation in cockroachdb/docs#2823. |
@jordanlewis, I'm trying to document this for 2.0, but I can't quite understand it. Does |
Ah, I think this was documented by @knz here? https://www.cockroachlabs.com/docs/dev/common-table-expressions.html#use-ctes-at-most-once |
No this is a different issue. Jesse I can volunteer to document this known limitation, together with the other one you found yesterday. |
Thanks, @knz! To save extra git work, please just add your writeup as a comment on this PR: cockroachdb/docs#2823 |
done |
@knz, @jseldess the workaround documented in the "known limitation" doesn't work for me. It says:
Swapping the operands results in the same error:
|
@jordanlewis Can I get a quick blurb describing this known limitation w/r/t the impact to user experience? Ideally, we need it by Friday 10/26 for the 2.1 Known Limitations page. Posting it on this issue and/or pinging me would be great. |
This has been fixed in the new opt code -- it's only a limitation in the heuristic planner. """ When the cost-based optimizer is disabled, or when it does not support a query, a common table expression defined outside of a VALUES or UNION clause will not be available inside it. For example |
Closing due to fixed on CBO status. |
@jordanlewis, can I resolve/remove this known limitation from the 20.1 docs? https://www.cockroachlabs.com/docs/dev/known-limitations.html#using-common-table-expressions-in-values-and-union-clauses |
Yes! |
Thanks, @jordanlewis. |
expected:
actual:
The text was updated successfully, but these errors were encountered: