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


##########
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 */

Review Comment:
   `parseQuery` is a new method of Spark trait `ParserInterface`. there would 
be compile issue If we call this method from any class that’s shared across 
different versions of spark, because older `ParserInterface` doesn’t have this 
method
   
   Due to the same reason, we can't mark this method with `override` because 
for older spark there isn't `parseQuery`



-- 
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]

Reply via email to