CTTY commented on code in PR #5943:
URL: https://github.com/apache/hudi/pull/5943#discussion_r931580643


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/parser/HoodieCommonSqlParser.scala:
##########
@@ -57,6 +57,14 @@ class HoodieCommonSqlParser(session: SparkSession, delegate: 
ParserInterface)
 
   override def parseDataType(sqlText: String): DataType = 
delegate.parseDataType(sqlText)
 
+  /* SPARK-37266 Added parseQuery to ParserInterface in Spark 3.3.0. This is a 
patch to prevent
+   hackers from tampering text with persistent view, it won't be called in 
older Spark
+   Don't mark this as override for backward compatibility
+   Can't use sparkExtendedParser directly here due to the same reason */
+  def parseQuery(sqlText: String): LogicalPlan = parse(sqlText) { parser =>

Review Comment:
   I reused the code flow from `parsePlan` method under the same class here. 
Calling `parse` might not be needed here. good point



-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to