You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "beliefer (via GitHub)" <gi...@apache.org> on 2023/07/12 12:02:53 UTC
[GitHub] [spark] beliefer commented on a diff in pull request #41898: [SPARK-44338][SQL] Fix view schema mismatch error message
beliefer commented on code in PR #41898:
URL: https://github.com/apache/spark/pull/41898#discussion_r1261075804
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala:
##########
@@ -909,11 +909,11 @@ class SessionCatalog(
val viewText = metadata.viewText.get
val userSpecifiedColumns =
if (metadata.schema.fieldNames.toSeq == metadata.viewQueryColumnNames) {
- ""
+ " "
} else {
- s"(${metadata.schema.fieldNames.mkString(", ")})"
+ s" (${metadata.schema.fieldNames.mkString(", ")}) "
}
- Some(s"CREATE OR REPLACE VIEW $viewName $userSpecifiedColumns AS $viewText")
+ Some(s"CREATE OR REPLACE VIEW $viewName${userSpecifiedColumns}AS $viewText")
Review Comment:
Thank you for the fix.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org