1
我需要将使用Spark SQL的连接操作转换为自定义连接。 (对自定义物理计划的逻辑计划)。 我写了转变火花联接操作的自定义策略加入Spark:Catalyst在Dataframe上添加策略
object CustomStrategy extends Strategy {
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
case Join(left, right, Inner, Some(condition))
=> CustomJoin(df1, df2, left.output:: right.output) :: Nil
case _ => Nil } }
是否有可能表达对Dataframes的CustomJoin操作,而不是logicalPlan?意思是把两个数据帧作为输入?