dongjoon-hyun commented on code in PR #55547:
URL: https://github.com/apache/spark/pull/55547#discussion_r3195738724
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DataSourceV2Strategy.scala:
##########
@@ -448,14 +448,29 @@ class DataSourceV2Strategy(session: SparkSession) extends
Strategy with Predicat
case _: NoopCommand =>
LocalTableScanExec(Nil, Nil, None) :: Nil
- case RenameTable(r @ ResolvedTable(catalog, oldIdent, _, _), newIdent,
isView) =>
+ case RenameTable(r @ ResolvedTable(catalog, oldIdent, _, _),
rawNewNameParts, isView) =>
if (isView) {
throw QueryCompilationErrors.cannotRenameTableWithAlterViewError()
}
+
+ // Strip catalog prefix if the identifier is catalog-qualified.
+ val newNameParts = if (rawNewNameParts.length > 1 &&
+ SQLConf.get.resolver(rawNewNameParts.head, catalog.name())) {
Review Comment:
`session.sessionState.conf.resolver` will be better in this case.
--
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]