-
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: WITH temp_data AS and recursion alternatives #14592
Comments
Common Table Expressions are planned for the future, but we haven't given them a concrete placement on the roadmap. It is almost certain that they won't be supported in the next 1-3 months in a stable release as we're planning for a 6 month cadence for stable releases. The alternative to using a CTE (i.e. @knz I believed you investigated how hard it would be to implement CTEs. Anything to add here? |
#7029 tracks the general common table expression implementation. |
@petermattis Certainly, recursion is not easy to implement. We are trying to avoid having to do recursion, but might have to now. Hopefully these CTEs can be added soon. Thanks for clarifying. |
So to clarify from the engineering perspective:
|
Closing as we now have #21085 to track recursive CTEs specifically. |
I believe as pointed out in an issue about table expressions that
WITH data AS (select...)
syntax is not supported yet and not to mention the postgresWITH recursive syntax
. We are really trying to replace postgres with cockroach but would like to know what the timeline is for recursion. Or if it isn't in the future 1-3months, what will be an alternative to achieve essentially the following in the currently supported subset of SQL expressions implemented in cockroach. Please advise.So basically all nodes are connected to another node via
parent_id
, and given a child, we want to get all of its ancestors.The text was updated successfully, but these errors were encountered: