cloud-fan commented on code in PR #51373: URL: https://github.com/apache/spark/pull/51373#discussion_r2184533766
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala: ########## @@ -331,6 +331,21 @@ class InMemoryCatalog( catalog(db).tables(table).table = origTable.copy(schema = newSchema) } + override def alterTableSchema( + db: String, + table: String, + newSchema: StructType): Unit = synchronized { + requireTableExists(db, table) + val origTable = catalog(db).tables(table).table + + val partCols = origTable.partitionColumnNames + assert(newSchema.map(_.name).takeRight(partCols.length) == partCols, + s"Partition columns ${partCols.mkString("[", ", ", "]")} are only supported at the end of " + Review Comment: why do we need to have this limitation? -- 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