I need to transform a join operation using Spark SQL to a custom join. (logical plan to a custom physical plan). I have written a strategy that transforms the spark join operation to a custom join
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 } }
Is it possible to express the CustomJoin operation on Dataframes, rather than logicalPlan? meaning taking as inputs two dataframes?