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

cherry-pick 2.0: sql: use a reusable name resolution algo for star expansions #24842

Merged
merged 1 commit into from
Apr 16, 2018

Conversation

knz
Copy link
Contributor

@knz knz commented Apr 16, 2018

Picks #24811.
cc @cockroachdb/release

A previous patch has added a reusable name resolution mechanism which
encapsulates all the special cases supported CockroachDB into a single
code path. This covers both the resolution of object names and column
names.

Prior to this patch however, the expansion of qualified stars was
using a separate code path. This proved to be incorrect/insufficient
however, because one of the special cases of name resolution should
apply to star expansion too and the separate code path did not contain
the special case.

To solve this problem, this patch abstracts the resolution of
qualified stars in a common algorithm alongside the others (in
`sem/name_resolution.go`) and ensures it is used where applicable.

Release note (bug fix): CockroachDB now again allows to use a simply
qualified table name in qualified stars (e.g., `SELECT mydb.kv.* FROM
kv`), for compatibility with CockroachDB v1.x.
@knz knz requested review from jordanlewis, justinj, rytaft and a team April 16, 2018 20:45
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rytaft
Copy link
Collaborator

rytaft commented Apr 16, 2018

:lgtm:


Review status: 0 of 5 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@knz
Copy link
Contributor Author

knz commented Apr 16, 2018

thanks!

@knz
Copy link
Contributor Author

knz commented Apr 16, 2018

bors r+

craig bot pushed a commit that referenced this pull request Apr 16, 2018
24817: cherrypick-2.0: sql: fix qualified index name resolution r=knz a=knz

Picks #24778.
cc @cockroachdb/release 

24842: cherry-pick 2.0: sql: use a reusable name resolution algo for star expansions r=knz a=knz

Picks #24811.
cc @cockroachdb/release 

Co-authored-by: Raphael 'kena' Poss <knz@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented Apr 16, 2018

Build succeeded

@craig craig bot merged commit 2f12b68 into cockroachdb:release-2.0 Apr 16, 2018
@knz knz deleted the 20180416-cherrypick-24811 branch April 16, 2018 21:27
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