GitHub user dilipbiswal opened a pull request:
https://github.com/apache/spark/pull/10943
[SPARK-12988] Can't drop columns that contain dots
Neither of theses works:
val df = Seq((1, 1)).toDF("a_b", "a.c")
df.drop("a.c").collect()
df: org.apache.spark.sql.DataFrame = [a_b: int, a.c: int]
val df = Seq((1, 1)).toDF("a_b", "a.c")
df.drop("`a.c`").collect()
df: org.apache.spark.sql.DataFrame = [a_b: int, a.c: int]
Given that you can't use drop to drop subfields, it seems to me that we
should treat the column name literally (i.e. as though it is wrapped in back
ticks)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dilipbiswal/spark spark-12988
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/10943.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #10943
----
commit e7f30a40165b0e5c2cf86341bc5ce1b1079afe6e
Author: Dilip Biswal <[email protected]>
Date: 2016-01-27T07:05:39Z
[SPARK-12988] Can't drop columns that contain dots
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]