dongjoon-hyun commented on code in PR #50623: URL: https://github.com/apache/spark/pull/50623#discussion_r2050396008
########## sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala: ########## @@ -666,12 +666,19 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat val newTableProps = propsFromOldTable ++ tableDefinition.properties + partitionProviderProp ++ newFormatIfExists + val (newSchema, partitionColumnNames) = if (oldTableDef.schema == EMPTY_DATA_SCHEMA) { + val restoredOldTable = restoreTableMetadata(oldTableDef) + (StructType(EMPTY_DATA_SCHEMA ++ restoreTableMetadata(oldTableDef).partitionSchema), Review Comment: nit, Maybe, the following? ```scala (StructType(EMPTY_DATA_SCHEMA ++ restoreTableMetadata(oldTableDef).partitionSchema), (StructType(EMPTY_DATA_SCHEMA ++ restoredOldTable.partitionSchema), ``` -- 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. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org