gengliangwang commented on code in PR #50538: URL: https://github.com/apache/spark/pull/50538#discussion_r2034143306
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala: ########## @@ -256,6 +257,22 @@ class FindDataSourceTable(sparkSession: SparkSession) extends Rule[LogicalPlan] QualifiedTableName(table.identifier.catalog.get, table.database, table.identifier.table) val catalog = sparkSession.sessionState.catalog val dsOptions = DataSourceUtils.generateDatasourceOptions(extraOptions, table) + + // Invalidate the cache if the table is already cached but options have changed. + val cachedPlan = catalog.getCachedTable(qualifiedTableName) Review Comment: shall we fix the issue in the plan comparison or normalization instead? -- 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