-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-38350][SQL] Make the table name output of V1/V2 "desc extended table" consistent #35681
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,13 +120,13 @@ class DataSourceV2SQLSuite | |
| } | ||
|
|
||
| test("DescribeTable extended using v2 catalog") { | ||
| spark.sql("CREATE TABLE testcat.table_name (id bigint, data string)" + | ||
| spark.sql("CREATE TABLE testcat.default.table_name (id bigint, data string)" + | ||
| " USING foo" + | ||
| " PARTITIONED BY (id)" + | ||
| " TBLPROPERTIES ('bar'='baz')" + | ||
| " COMMENT 'this is a test table'" + | ||
| " LOCATION 'file:/tmp/testcat/table_name'") | ||
| val descriptionDf = spark.sql("DESCRIBE TABLE EXTENDED testcat.table_name") | ||
| val descriptionDf = spark.sql("DESCRIBE TABLE EXTENDED testcat.default.table_name") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this also fix SHOW TABLE EXTENDED?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no V2 version of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense |
||
| assert(descriptionDf.schema.map(field => (field.name, field.dataType)) | ||
| === Seq( | ||
| ("col_name", StringType), | ||
|
|
@@ -146,7 +146,9 @@ class DataSourceV2SQLSuite | |
| Array("_partition", "string", "Partition key used to store the row"), | ||
| Array("", "", ""), | ||
| Array("# Detailed Table Information", "", ""), | ||
| Array("Name", "testcat.table_name", ""), | ||
| Array("Catalog", "testcat", ""), | ||
| Array("Database", "default", ""), | ||
| Array("Table", "table_name", ""), | ||
| Array("Comment", "this is a test table", ""), | ||
| Array("Location", "file:/tmp/testcat/table_name", ""), | ||
| Array("Provider", "foo", ""), | ||
|
|
||
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.
is namespace() returning a list? Should this be a single identifier?
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.
Yes, namespace() returns a list. It's a feature of DS V2. Usually the length should be 1.
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.
so if it returns a list will the Database name contain periods?
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.
If the length of the namespace is 1, there is no any period
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.
we spoke online with Wenchen and Gengliang, didn't realize the namespace is a multi part name.