When writing in Spark Java I'm meeting this error while accessing a column of row of a Dataframe. I don't get why WrappedArray is retrieved from the Row instead of a normal Array.
java.lang.ClassCastException: class scala.collection.mutable.WrappedArray$ofRef cannot be cast to class [Ljava.lang.String
Example code : String[] myarray = my_df_row.getAs("col_name");
I need Java code, not scala or python. How to solve this issue ?