I have a column in my Dataset<Row> that contains WrappedArray<WrappedArray<Double>>. I am passing this column to an UDF to pull out one of the values.
How would I go about getting access to the Doubles in this nested structure?
I want to do something like this :
sparkSession.udf().register(ADD_START_TOTAL, (UDF1<WrappedArray<WrappedArray<Double>>, Double>) (totals) -> totals[0][1], DataTypes.DoubleType);
Here is an example of what the column looks like when I invoke Dataset.show() method my Dataset looks like below.
[WrappedArray(2.0...
EDIT: Found this post How to cast a WrappedArray[WrappedArray[Float]] to Array[Array[Float]] in spark (scala) but not sure how to translate this to Java.