dongjoon-hyun commented on code in PR #47380: URL: https://github.com/apache/spark/pull/47380#discussion_r1682050844
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala: ########## @@ -354,6 +351,14 @@ class Analyzer(override val catalogManager: CatalogManager) extends RuleExecutor UpdateAttributeNullability), Batch("UDF", Once, ResolveEncodersInUDF), + // The rewrite rules might move resolved query plan into subquery. Once the resolved plan + // contains ScalaUDF, their encoders won't be resolved if `ResolveEncodersInUDF` is not + // applied before the rewrite rules. So we need to apply `ResolveEncodersInUDF` before the + // rewrite rules. + Batch("DML rewrite", fixedPoint, + RewriteDeleteFromTable :: Review Comment: ```scala [error] /home/runner/work/spark-1/spark-1/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:359:30: type mismatch; [error] found : List[org.apache.spark.sql.catalyst.analysis.RewriteRowLevelCommand] [error] required: org.apache.spark.sql.catalyst.rules.Rule[org.apache.spark.sql.catalyst.plans.logical.LogicalPlan] [error] RewriteDeleteFromTable :: [error] ``` -- 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