一、自定义优化规则
Spark在2.2版本引入了一个强大的特性,添加钩子和拓展点,允许用户自定义优化规则
1、实现自定义规则 (静默规则,通过 set spark.sql.planChangeLog.level=WARN,确认执行到就行)
case class MyPushDown(spark: SparkSession) extends Rule[LogicalPlan] {
def apply(plan: LogicalPlan): LogicalPlan = plan transform {