viirya commented on code in PR #50519: URL: https://github.com/apache/spark/pull/50519#discussion_r2038339758
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala: ########## @@ -185,11 +185,14 @@ class DataSourceV2Strategy(session: SparkSession) extends Strategy with Predicat case c @ CreateTable(ResolvedIdentifier(catalog, ident), columns, partitioning, tableSpec: TableSpec, ifNotExists) => - ResolveDefaultColumns.validateCatalogForDefaultValue(columns, catalog.asTableCatalog, ident) + val tableCatalog = catalog.asTableCatalog + ResolveDefaultColumns.validateCatalogForDefaultValue(columns, tableCatalog, ident) Review Comment: Don't we need to do same check for `ALTER TABLE`? -- 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