-
- Downloads
[SPARK-13276] Catch bad characters at the end of a Table Identifier/Expression string
The parser currently parses the following strings without a hitch: * Table Identifier: * `a.b.c` should fail, but results in the following table identifier `a.b` * `table!#` should fail, but results in the following table identifier `table` * Expression * `1+2 r+e` should fail, but results in the following expression `1 + 2` This PR fixes this by adding terminated rules for both expression parsing and table identifier parsing. cc cloud-fan (we discussed this in https://github.com/apache/spark/pull/10649) jayadevanmurali (this causes your PR https://github.com/apache/spark/pull/11051 to fail) Author: Herman van Hovell <hvanhovell@questtec.nl> Closes #11159 from hvanhovell/SPARK-13276.
Showing
- sql/catalyst/src/main/antlr3/org/apache/spark/sql/catalyst/parser/SparkSqlParser.g 12 additions, 0 deletions...lr3/org/apache/spark/sql/catalyst/parser/SparkSqlParser.g
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/ParseDriver.scala 2 additions, 2 deletions...la/org/apache/spark/sql/catalyst/parser/ParseDriver.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/CatalystQlSuite.scala 3 additions, 2 deletions...scala/org/apache/spark/sql/catalyst/CatalystQlSuite.scala
Please register or sign in to comment