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

release-21.1: opt: allow casts in initial CTE expression #62824

Merged

Conversation

RaduBerinde
Copy link
Member

Backport 1/1 commits from #62808.

/cc @cockroachdb/release


In #60560, we made the matching of types in UNIONs more strict. In the
recursive CTE code, we don't allow adding casts to the initial
expression, so the change caused us to regress in terms of supported
queries.

This change fixes this by allowing casts to the initial expression.
Not sure why I didn't allow this from the get-go.

Release note (bug fix): fixed "types cannot be matched for WITH
RECURSIVE" error in cases where we can cast the type in the initial
expression.

In cockroachdb#60560, we made the matching of types in UNIONs more strict. In the
recursive CTE code, we don't allow adding casts to the initial
expression, so the change caused us to regress in terms of supported
queries.

This change fixes this by allowing casts to the initial expression.
Not sure why I didn't allow this from the get-go.

Release note (bug fix): fixed "types cannot be matched for WITH
RECURSIVE" error in cases where we can cast the type in the initial
expression.
@RaduBerinde RaduBerinde requested a review from mgartner March 30, 2021 20:43
@RaduBerinde RaduBerinde requested a review from a team as a code owner March 30, 2021 20:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde merged commit b4ae375 into cockroachdb:release-21.1 Mar 30, 2021
@RaduBerinde RaduBerinde deleted the backport21.1-62808 branch March 30, 2021 23:36
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