dongjoon-hyun commented on a change in pull request #25149: [SPARK-28383][SQL] SHOW CREATE TABLE is not supported on a temporary view URL: https://github.com/apache/spark/pull/25149#discussion_r312776831
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala ########## @@ -949,16 +949,22 @@ case class ShowCreateTableCommand(table: TableIdentifier) extends RunnableComman override def run(sparkSession: SparkSession): Seq[Row] = { val catalog = sparkSession.sessionState.catalog - val tableMetadata = catalog.getTableMetadata(table) - - // TODO: unify this after we unify the CREATE TABLE syntax for hive serde and data source table. - val stmt = if (DDLUtils.isDatasourceTable(tableMetadata)) { - showCreateDataSourceTable(tableMetadata) + if (catalog.isTemporaryTable(table)) { + throw new AnalysisException( + s"SHOW CREATE TABLE is not supported on a temporary view: ${table.identifier}") } else { - showCreateHiveTable(tableMetadata) - } + val tableMetadata = catalog.getTableMetadata(table) - Seq(Row(stmt)) + // TODO: unify this after we unify the Review comment: Hi, @wangyum . I know that this `TODO` is not generated in this PR, but this is a good change to make this to `IDed TODO`. It will help the other contributors pick up this issue. Could you file a JIRA for this and use that JIRA ID here, please? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org