> ontime %>% group_by(year) %>% summarize(percentile_approx(dep_delay, .5)) %>% collect %>% View
Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", :
Unable to retrieve JDBC result set for CREATE TABLE `zhgyvpmauy` AS SELECT `year`, `percentile_approx(dep_delay, 0.5)`
FROM (select `year`, percentile_approx(`dep_delay`, 0.5) as `percentile_approx(dep_delay, 0.5)`
from `ontime`
group by `year`) AS `tmp625330609502271` (org.apache.spark.sql.AnalysisException: cannot resolve 'percentile_approx(dep_delay, 0.5)' given input columns year, percentile_approx(dep_delay, 0.5); line 1 pos 44)
> ontime %>% group_by(year) %>% summarize(padd = percentile_approx(dep_delay, .5)) %>% collect %>% View
> #works