rdblue commented on a change in pull request #24832: [SPARK-27845][SQL][WIP]
DataSourceV2: Insert into tables in multiple catalogs
URL: https://github.com/apache/spark/pull/24832#discussion_r292196829
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -274,7 +284,7 @@ class AstBuilder(conf: SQLConf) extends
SqlBaseBaseVisitor[AnyRef] with Logging
override def visitInsertOverwriteTable(
ctx: InsertOverwriteTableContext): InsertTableParams = withOrigin(ctx) {
assert(ctx.OVERWRITE() != null)
- val tableIdent = visitTableIdentifier(ctx.tableIdentifier)
+ val tableIdent = visitMultipartIdentifier(ctx.multipartIdentifier)
Review comment:
I think this needs to be updated to remove the `ParseException` thrown when
`IF NOT EXISTS` is present and there are dynamic partitions. I think that is an
analysis problem, not a parse problem.
Also, I don't see a reason why IF NOT EXISTS would not be supported with
dynamic partitions. Wouldn't that fail if any partitions would be overwritten?
It seems to make sense to me, but maybe there is a good reason why this is not
allowed? @gatorsmile can you comment?
----------------------------------------------------------------
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]