Details
Description
I have an input dataframe df with the following schema:
|-- origin: string (nullable = true) |-- product: struct (nullable = true) | |-- id: integer (nullable = true)
when I try to select the first 20 rows of the id column I execute:
df.select("product.id").show(20, false)
and I manage to get the result. But when I execute the following:
df.map(_.getAs[Int]("product.id")).show(20, false)
I get the following error:
java.lang.IllegalArgumentException: Field "product.id" does not exist.