cloud-fan commented on a change in pull request #34543:
URL: https://github.com/apache/spark/pull/34543#discussion_r747452400
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -877,7 +877,12 @@ class SessionCatalog(
}
val viewConfigs = metadata.viewSQLConfigs
val parsedPlan =
SQLConf.withExistingConf(View.effectiveSQLConf(viewConfigs, isTempView)) {
- parser.parsePlan(viewText)
+ try {
+ parser.parseQuery(viewText)
+ } catch {
+ case _: ParseException => throw new AnalysisException(
+ s"Invalid view text of view ${metadata.qualifiedName}, it may have
been tampered with")
Review comment:
shall we display the view sql text as wel?
--
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]