-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-29734][SQL] Datasource V2: Support SHOW CURRENT NAMESPACE #26379
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
Conversation
|
cc: @cloud-fan @rdblue |
|
I was planning to expose |
|
Test build #113181 has finished for PR 26379 at commit
|
|
SGTM. |
|
Thanks @cloud-fan. I updated it to |
| */ | ||
| case class ShowCurrentNamespace(catalogManager: CatalogManager) extends Command { | ||
| override val output: Seq[Attribute] = Seq( | ||
| AttributeReference("catalogName", StringType, nullable = false)(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's be consistent. either catalog/namespace or catalogName/namespacName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to catalog/namespace
|
Test build #113215 has finished for PR 26379 at commit
|
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
Outdated
Show resolved
Hide resolved
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
Show resolved
Hide resolved
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM (except three minor comments about test cases.)
In general, unit test case should not have a side-effect after the test. Please confirm if the new UT follow that principle.
Thanks, @imback82 !
|
Test build #113218 has finished for PR 26379 at commit
|
|
Merged to master. The last touched test case already passed~ |
|
Thanks everyone for review and help! |
|
Test build #113227 has finished for PR 26379 at commit
|
What changes were proposed in this pull request?
This PR introduces a new SQL command:
SHOW CURRENT NAMESPACE.Why are the changes needed?
Datasource V2 supports multiple catalogs/namespaces and having
SHOW CURRENT NAMESPACEto retrieve the current catalog/namespace info would be useful.Does this PR introduce any user-facing change?
Yes, the user can perform the following:
How was this patch tested?
Added unit tests.