cxzl25 commented on code in PR #5947:
URL: https://github.com/apache/hudi/pull/5947#discussion_r905073625


##########
hudi-spark-datasource/hudi-spark3/src/main/scala/org/apache/spark/sql/parser/HoodieSpark3_2ExtendedSqlParser.scala:
##########
@@ -32,16 +32,23 @@ import org.apache.spark.sql.catalyst.{FunctionIdentifier, 
TableIdentifier}
 import org.apache.spark.sql.types._
 import org.apache.spark.sql.{AnalysisException, SparkSession}
 
+import scala.util.control.NonFatal
+
 class HoodieSpark3_2ExtendedSqlParser(session: SparkSession, delegate: 
ParserInterface)
   extends ParserInterface with Logging {
 
   private lazy val conf = session.sqlContext.conf
   private lazy val builder = new HoodieSpark3_2ExtendedSqlAstBuilder(conf, 
delegate)
 
   override def parsePlan(sqlText: String): LogicalPlan = parse(sqlText) { 
parser =>
-    builder.visit(parser.singleStatement()) match {
-      case plan: LogicalPlan => plan
-      case _=> delegate.parsePlan(sqlText)
+    try {
+      builder.visit(parser.singleStatement()) match {
+        case plan: LogicalPlan => plan
+        case _=> delegate.parsePlan(sqlText)
+      }
+    } catch {
+      case NonFatal(_) =>

Review Comment:
   OK



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