Advertisement
kieni17

Untitled

Apr 19th, 2020
2,734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SPARK 0.29 KB | None | 0 0
  1. val query4 = octDF
  2.       .join(novDF, octDF("user_id") === novDF("user_id"))
  3.       .filter(octDF("event_type") === "view" )
  4.       .groupBy(octDF("category_id"))
  5.       .agg(avg(novDF("price")).as("avgPrice"))
  6.       .orderBy(desc("avgPrice"))
  7.  
  8. query4.explain()
  9. spark.time(query4.show(false))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement