pan3793 commented on code in PR #40823:
URL: https://github.com/apache/spark/pull/40823#discussion_r1169585440


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala:
##########
@@ -127,7 +127,7 @@ abstract class AbstractSqlParser extends ParserInterface 
with SQLConfHelper with
         toResult(parser)
       }
       catch {
-        case e: ParseCancellationException =>
+        case _: ParseCancellationException | _: ParseException =>

Review Comment:
   @Hisoka-X @cloud-fan I think we should provide two `ErrorStrategy`s
   ```
   class SparkParserBailErrorStrategy() extends BailErrorStrategy
   class SparkParserDefaultErrorStrategy() extends DefaultErrorStrategy
   ```
   
   and following the 
https://github.com/antlr/antlr4/issues/192#issuecomment-15238595 to implement 
the "two-stage parsing strategy"



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

Reply via email to