Description
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).
Attachments
Issue Links
- is duplicated by
-
SPARK-12987 Drop fails when columns contain dots
- Resolved
-
SPARK-13455 Periods in dataframe column names breaks df.drop(<string>)
- Resolved
- relates to
-
SPARK-13197 When trying to select from the data frame which contains the columns with . in it, it is throwing exception.
- Closed
- links to