Appearance
val result = spark.read.json("/data/orders") .filter($"status" === "PAID") .groupBy($"city") .count()
代码不复杂,但它背后已经涉及读取、过滤、聚合和执行计划。