Skip to content

Commit

Permalink
fix(spark): handle AggregationPhase UNSPECIFIED
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarua committed Dec 24, 2024
1 parent 116f1a7 commit bedd309
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ object ToAggregateFunction {
case other => throw new UnsupportedOperationException(s"not currently supported: $other.")
}
def toSpark(phase: SExpression.AggregationPhase): AggregateMode = phase match {
case SExpression.AggregationPhase.UNSPECIFIED =>
Final // UNSPECIFIED implies INTERMEDIATE_TO_RESULT
case SExpression.AggregationPhase.INITIAL_TO_INTERMEDIATE => Partial
case SExpression.AggregationPhase.INTERMEDIATE_TO_INTERMEDIATE => PartialMerge
case SExpression.AggregationPhase.INTERMEDIATE_TO_RESULT => Final
Expand Down

0 comments on commit bedd309

Please sign in to comment.