diff options
author | jiangxingbo <jiangxb1987@gmail.com> | 2016-10-09 21:52:46 -0700 |
---|---|---|
committer | Herman van Hovell <hvanhovell@databricks.com> | 2016-10-09 21:52:46 -0700 |
commit | 26fbca480604ba258f97b9590cfd6dda1ecd31db (patch) | |
tree | 8580656205ca7a2b2533f7b695e36973dd6ef059 /.travis.yml | |
parent | 8a6bbe095b6a9aa33989c0deaa5ed0128d70320f (diff) | |
download | spark-26fbca480604ba258f97b9590cfd6dda1ecd31db.tar.gz spark-26fbca480604ba258f97b9590cfd6dda1ecd31db.tar.bz2 spark-26fbca480604ba258f97b9590cfd6dda1ecd31db.zip |
[SPARK-17832][SQL] TableIdentifier.quotedString creates un-parseable names when name contains a backtick
## What changes were proposed in this pull request?
The `quotedString` method in `TableIdentifier` and `FunctionIdentifier` produce an illegal (un-parseable) name when the name contains a backtick. For example:
```
import org.apache.spark.sql.catalyst.parser.CatalystSqlParser._
import org.apache.spark.sql.catalyst.TableIdentifier
import org.apache.spark.sql.catalyst.analysis.UnresolvedAttribute
val complexName = TableIdentifier("`weird`table`name", Some("`d`b`1"))
parseTableIdentifier(complexName.unquotedString) // Does not work
parseTableIdentifier(complexName.quotedString) // Does not work
parseExpression(complexName.unquotedString) // Does not work
parseExpression(complexName.quotedString) // Does not work
```
We should handle the backtick properly to make `quotedString` parseable.
## How was this patch tested?
Add new testcases in `TableIdentifierParserSuite` and `ExpressionParserSuite`.
Author: jiangxingbo <jiangxb1987@gmail.com>
Closes #15403 from jiangxb1987/backtick.
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions