I am trying to do a percentile over a column using a Window function as below. I have referred here to use the ApproxQuantile definition over a group.
ApproxQuantile
percentile_approx takes percentage and accuracy. It seems, they both must be a constant literal. Thus we can't compute the percentile_approx at runtime with dynamically calculated percentage and accuracy.
percentile_approx
percentage
accuracy
ref- apache spark git percentile_approx source