Uh oh!
There was an error while loading. Please reload this page.
[SPARK-25006][SQL] Add CatalogTableIdentifier. - #21978
Conversation
rdblue
commented
Aug 2, 2018
@gatorsmile and @cloud-fan, this adds catalog to |
This comment has been minimized.
This comment has been minimized.
d61e0f1 to
c0683a8Compare
This comment has been minimized.
This comment has been minimized.
7abc8b8 to
f34e23bCompare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f34e23b to
6fe2d07Compare
This comment has been minimized.
This comment has been minimized.
rdblue
commented
Aug 3, 2018
Retest this please. |
This comment has been minimized.
This comment has been minimized.
6fe2d07 to
00295eeComparerdblue
commented
Aug 4, 2018
FYI @jzhuge |
This comment has been minimized.
This comment has been minimized.
rdblue
commented
Aug 5, 2018
Retest this please. |
This comment has been minimized.
This comment has been minimized.
cloud-fan
commented
Aug 7, 2018
rdblue
commented
Aug 7, 2018
@cloud-fan, that's fine with me since #17185 is already merged. Would this conflict with #17185? We can just add a case that detects whether the first identifier in the seq is a catalog when updating expressions. This PR is just the start for adding catalog to table identifiers. None of the SQL statements are modified in this PR on purpose: code paths will need to be updated to support |
SparkQA
commented
Aug 7, 2018
Test build #94375 has finished for PR 21978 at commit
|
rdblue
commented
Aug 8, 2018
@cloud-fan, when do you think we can get this in? It doesn't need to go in 2.4 because it doesn't change any read or write paths -- nothing uses CatalogTableIdentifier yet -- but it would be great to get it into master so we can start building paths that do support CatalogTableIdentifier. |
mccheah
commented
Nov 22, 2018
Wanted to follow up here - are we planning on merging this or are there more things we need to discuss? |
mccheah
left a comment
There was a problem hiding this comment.
I think this is fine, just some minor comments.
There was a problem hiding this comment.
Update formats in these scaladocs.
There was a problem hiding this comment.
No, we want to move away from a special global catalog. I think that Spark should have a current catalog, like a current database, which is used to resolve references that don't have an explicit catalog. That would have a default, just like the current database has a default.
There was a problem hiding this comment.
Sounds good. When we add the logical side of leveraging catalogs we can revisit the API of how to set the current catalog.
There was a problem hiding this comment.
Agreed. This introduces the ability to expose a catalog to Spark. It doesn't actually add any user-facing operations.
This adds CatalogTableIdentifier, which is an identifier that consists of a triple: catalog, database, and table. Catalog and database are optional. The existing TableIdentifier class extends CatalogTableIdentifier and is guarateed to have no defined catalog component. Classes that expect a TableIdentifier should continue to use TableIdentifier to ensure that catalogs are not leaked into code paths that do not support them.
00295ee to
beebccfComparerdblue
commented
Nov 29, 2018
Rebased on master. |
SparkQA
commented
Nov 29, 2018
Test build #99480 has finished for PR 21978 at commit
|
| def database: Option[String] | ||
| def catalog: Option[String] |
There was a problem hiding this comment.
This is an abstract method definition and catalog is always implemented by a val.
mccheah
commented
Feb 28, 2019
Think there's a failing build, also do we still need this or have the underlying ideas changed in our discussion? My understanding is that we still need this and that catalog identifiers are important to start with to build the follow up table catalog APIs on. Also should this include multi-part identifier? |
jzhuge
commented
Feb 28, 2019
via email
Hi Matt,
Agree we still need it. My PR for SPARK-26946 to implement multi-part
identifier will be built on top of this because CatalogTableIdentifier at
least provides a good way to incrementally migrate code paths. Do not
review that PR yet, I will update in a few days, then we will have a better
picture.
Thanks, …On Wed, Feb 27, 2019 at 7:27 PM mccheah ***@***.***> wrote:
Think there's a failing build, also do we still need this or have the
underlying ideas changed in our discussion? My understanding is that we
still need this and that catalog identifiers are important to start with to
build the follow up table catalog APIs on.
Also should this include multi-part identifier?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#21978 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABy-pIdmtFgKnHpqK38MHEv1viN5eGtgks5vR0yTgaJpZM4VtC5y>
.
-- John Zhuge |
rdblue
commented
Mar 29, 2019
Identifiers for multi-catalog support were added in #23848. I'm closing this. |
What changes were proposed in this pull request?
This adds
CatalogTableIdentifier, which is an identifier that consists of a triple: catalog, database, and table. Catalog and database are optional.The existing
TableIdentifierclass extendsCatalogTableIdentifierand is guarateed to have no defined catalog component. Classes that expect aTableIdentifierwill continue to useTableIdentifierto ensure that catalogs are not leaked into code paths that do not support them.This adds a parser rule,
catalogTableIdentifier, that can parse identifiers with a catalog. An identifier with only two components will match database and table, leaving the catalog undefined. Only identifiers with three components will have a defined catalog. In addition, rules must be re-written to supportcatalogTableIdentifier. Existing rules will continue to usetableIdentifierwith no catalog.How was this patch tested?
Existing tests. This should not change any behavior.