KurtYoung commented on a change in pull request #9971: [FLINK-14490][table] Add
methods for interacting with temporary objects
URL: https://github.com/apache/flink/pull/9971#discussion_r339394157
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/FlinkPlannerImpl.scala
##########
@@ -179,15 +154,7 @@ class FlinkPlannerImpl(
schemaPath: util.List[String],
viewPath: util.List[String]): RelRoot = {
- val parser: SqlParser = SqlParser.create(queryString, parserConfig)
- var sqlNode: SqlNode = null
- try {
- sqlNode = parser.parseQuery
- }
- catch {
- case e: CSqlParseException =>
- throw new SqlParserException(s"SQL parse failed. ${e.getMessage}", e)
- }
+ val sqlNode: SqlNode = parser.parse(queryString)
Review comment:
Is it intended to re-use parser here? I noticed in `PlannerBase::parser` you
pointed out that you didn't want to reuse parser since config might changed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services