Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 29.4k
[SPARK-17284] [SQL] Remove Statistics-related Table Properties from SHOW CREATE TABLE#14855
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -791,11 +791,22 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman | ||
| } | ||
| } | ||
| // These table properties should not be included in the output statement of SHOW CREATE TABLE | ||
| val excludedTableProperties = Set( | ||
| // The following are hive-generated statistics fields | ||
| "COLUMN_STATS_ACCURATE", | ||
| "numFiles", | ||
| "numPartitions", | ||
| "numRows", | ||
| "rawDataSize", | ||
| "totalSize" | ||
| ) | ||
| private def showHiveTableProperties(metadata: CatalogTable, builder: StringBuilder): Unit = { | ||
| if (metadata.properties.nonEmpty) { | ||
| val filteredProps = metadata.properties.filterNot { | ||
| // Skips "EXTERNAL" property for external tables | ||
| case (key, _) => key == "EXTERNAL" && metadata.tableType == EXTERNAL | ||
| // Skips all the stats info (See the JIRA: HIVE-13792) | ||
| ||
| case (key, _) => excludedTableProperties.contains(key) | ||
| } | ||
| val props = filteredProps.map { case (key, value) => | ||
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.
Shouldn't we set each of these property names as a constant so that we can use them in the translation layer?
Uh oh!
There was an error while loading. Please reload this page.
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.
This PR is for fixing a bug. We might need to backport it to 2.0. When we implementing the translation layer, we can do that, just like what we did for the property names of the Data Source Table schema