Hello, I would like to add a column of StructType to DataFrame. What would be the best way to do it? Not sure if it is possible using withColumn. A possible way is to convert the dataframe into a RDD[Row], add the struct and then convert it back to dataframe. But that seems an overkill.
Please note that I don't know the StructType beforehand and I am creating it based on some configuration so using case classes is out of picture. Thanks.