I have given the sample table. I want to get the median from \"value\" column for each group \"source\" column. Where source column is of String DataType value column is of
Have you tried the DataFrame.describe() method?
https://spark.apache.org/docs/latest/api/java/org/apache/spark/sql/DataFrame.html#describe(java.lang.String...)
not sure it's exactly what you're looking for, but might get you closer.