Spark SQL join, group by and functions
Spark SQL join, group by and functionsjoin, group by example Spark SQL JoinDataset people = spark.read().parquet("...");Dataset department = spark.read().parquet("..."); people.filter(people.col("age").gt(30)) .join(department, people.col("deptId").equalTo(department.col("id"))) .groupBy(department.col("name"), people.col("gender")) .agg(avg(people.col("salary")), max(people.col("age"))); group ..