cloud-fan commented on a change in pull request #35204:
URL: https://github.com/apache/spark/pull/35204#discussion_r784506250
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -266,12 +266,15 @@ class ResolveSessionCatalog(val catalogManager:
CatalogManager)
isOverwrite,
partition)
- case ShowCreateTable(ResolvedV1TableOrViewIdentifier(ident), asSerde,
output) =>
- if (asSerde) {
- ShowCreateTableAsSerdeCommand(ident.asTableIdentifier, output)
- } else {
- ShowCreateTableCommand(ident.asTableIdentifier, output)
- }
+ case ShowCreateTable(ResolvedV1TableOrViewIdentifier(ident), asSerde,
output) if asSerde =>
+ ShowCreateTableAsSerdeCommand(ident.asTableIdentifier, output)
+
+ // If target is view, force use v1 command
+ case ShowCreateTable(ResolvedViewIdentifier(ident), _, output) =>
+ ShowCreateTableCommand(ident.asTableIdentifier, output)
+
+ case ShowCreateTable(ResolvedV1TableIdentifier(ident), _, output)
+ if conf.useV1Command => ShowCreateTableCommand(ident.asTableIdentifier,
output)
Review comment:
can we fall back to v1 command if the resolved table is hive table? e.g.
catalog is session catalog and table provider is `hive`.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]