rdblue commented on a change in pull request #24686: [SPARK-27813][SQL]
DataSourceV2: Add DropTable logical operation
URL: https://github.com/apache/spark/pull/24686#discussion_r289060777
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -139,8 +139,8 @@ statement
DROP (IF EXISTS)? partitionSpec (',' partitionSpec)*
#dropTablePartitions
| ALTER TABLE tableIdentifier partitionSpec? SET locationSpec
#setTableLocation
| ALTER TABLE tableIdentifier RECOVER PARTITIONS
#recoverPartitions
- | DROP TABLE (IF EXISTS)? tableIdentifier PURGE?
#dropTable
- | DROP VIEW (IF EXISTS)? tableIdentifier
#dropTable
+ | DROP TABLE (IF EXISTS)? multipartIdentifier PURGE?
#dropTable
+ | DROP VIEW (IF EXISTS)? multipartIdentifier
#dropView
Review comment:
@cloud-fan, that's not what this PR does. This PR moves parsing into
Catalyst by introducing a parsed plan, `DropViewStatement`, for `DROP VIEW`. We
can still convert that to a `DropTable` in the analyzer if we choose to later,
like we do for v1. (But I think it makes much more sense to use a
`ViewCatalog`.)
The important thing is that we want to keep moving parsing code into
Catalyst using parsed plans to separate the implementation (DataSource logical
plans) from the parsing logic so that the parser isn't tightly coupled to
DataSource v1.
----------------------------------------------------------------
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]