diff options
author | Wenchen Fan <cloud0fan@outlook.com> | 2015-04-15 13:39:12 -0700 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-04-15 13:39:12 -0700 |
commit | 4754e16f4746ebd882b2ce7f1efc6e4d4408922c (patch) | |
tree | 873f70e80640277683a56b7ef09c7561ac336361 /sql/hive | |
parent | 557a797a273f1668065806cba53e19e6134a66d3 (diff) | |
download | spark-4754e16f4746ebd882b2ce7f1efc6e4d4408922c.tar.gz spark-4754e16f4746ebd882b2ce7f1efc6e4d4408922c.tar.bz2 spark-4754e16f4746ebd882b2ce7f1efc6e4d4408922c.zip |
[SPARK-6898][SQL] completely support special chars in column names
Even if we wrap column names in backticks like `` `a#$b.c` ``, we still handle the "." inside column name specially. I think it's fragile to use a special char to split name parts, why not put name parts in `UnresolvedAttribute` directly?
Author: Wenchen Fan <cloud0fan@outlook.com>
This patch had conflicts when merged, resolved by
Committer: Michael Armbrust <michael@databricks.com>
Closes #5511 from cloud-fan/6898 and squashes the following commits:
48e3e57 [Wenchen Fan] more style fix
820dc45 [Wenchen Fan] do not ignore newName in UnresolvedAttribute
d81ad43 [Wenchen Fan] fix style
11699d6 [Wenchen Fan] completely support special chars in column names
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala index 53a204b8c2..fd305eb480 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala @@ -1101,7 +1101,7 @@ https://cwiki.apache.org/confluence/display/Hive/Enhanced+Aggregation%2C+Cube%2C case Token(".", qualifier :: Token(attr, Nil) :: Nil) => nodeToExpr(qualifier) match { case UnresolvedAttribute(qualifierName) => - UnresolvedAttribute(qualifierName + "." + cleanIdentifier(attr)) + UnresolvedAttribute(qualifierName :+ cleanIdentifier(attr)) case other => UnresolvedGetField(other, attr) } |