Skip to content

Commit

Permalink
Replace transformDown with transform for the better DataBricks compat
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Apr 12, 2022
1 parent bb8abd2 commit b16e3b5
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ object SpatialFilterPushdownRules extends Rule[LogicalPlan] {
@transient private[this] lazy val logger = getLogger

def apply(plan: LogicalPlan): LogicalPlan =
plan.transformDown {
// format: off
/**
* transform is an alias to transformDown
* The transformDown usage causes the following error on DataBricks 9.1:
* * java.lang.NoClassDefFoundError: LogicalPlan,transformDown(Lscala/PartialFunction;)Lorg/apache/spark/sql/catalyst/plans/logical/LogicalPlan;
*/
// format: on
plan.transform {
case f @ Filter(condition: HiveGenericUDF, plan) if condition.of[ST_Intersects] =>
try {
val Seq(extentExpr, geometryExpr) = condition.children
Expand Down

0 comments on commit b16e3b5

Please sign in to comment.