Skip to content

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

Merged
craig[bot] merged 1 commit intocockroachdb:release-2.0from
knz:20180416-cherrypick-24811
Apr 16, 2018
Merged

cherry-pick 2.0: sql: use a reusable name resolution algo for star expansions#24842
craig[bot] merged 1 commit intocockroachdb:release-2.0from
knz:20180416-cherrypick-24811

Conversation

@knz
Copy link
Copy Markdown
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 a team, jordanlewis, justinj and rytaft April 16, 2018 20:45
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@rytaft
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

knz commented Apr 16, 2018

thanks!

@knz
Copy link
Copy Markdown
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
Copy Markdown
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