maropu commented on a change in pull request #25019: [SPARK-28195][SQL] Fix
CheckAnalysis not working for InsertIntoDataSourceDirCommand and report
misleading error message
URL: https://github.com/apache/spark/pull/25019#discussion_r300521462
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/internal/BaseSessionStateBuilder.scala
##########
@@ -188,6 +189,15 @@ abstract class BaseSessionStateBuilder(
customCheckRules
override protected def lookupCatalog(name: String): CatalogPlugin =
session.catalog(name)
+
+ override def checkAnalysis(plan: LogicalPlan): Unit = {
+ // We should check it's innerChildren for InsertIntoDataSourceDirCommand
+ val planToCheck = plan match {
+ case e: InsertIntoDataSourceDirCommand => e.query
+ case _ => plan
+ }
+ super.checkAnalysis(planToCheck)
Review comment:
Can we resolve this issue in the `InsertIntoDataSourceDirCommand` side?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]