Skip to content

Commit

Permalink
fix(spark): set the aggregate filter expression
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Coleman <[email protected]>
  • Loading branch information
andrew-coleman committed Sep 24, 2024
1 parent e24ce6f commit 79f3779
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,15 @@ class ToLogicalPlan(spark: SparkSession) extends DefaultRelVisitor[LogicalPlan]
)
throw new IllegalArgumentException(msg)
})

val filter = Option(measure.getPreMeasureFilter.orElse(null))
.map(_.accept(expressionConverter))

AggregateExpression(
aggregateFunction,
ToAggregateFunction.toSpark(function.aggregationPhase()),
ToAggregateFunction.toSpark(function.invocation()),
None
filter
)
}

Expand Down

0 comments on commit 79f3779

Please sign in to comment.