Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ulysses-you committed Nov 8, 2023
1 parent 9b32e16 commit 4a9d369
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ case class PullOutPreProject(spark: SparkSession) extends Rule[LogicalPlan] {
}

private def shouldAddPreProjectForAgg(agg: Aggregate): Boolean = {
agg.aggregateExpressions.exists(_.exists {
agg.aggregateExpressions.exists(_.find {
case ae: AggregateExpression =>
ae.aggregateFunction.children.exists(isNotAttributeAndLiteral) || ae.filter.exists(
isNotAttributeAndLiteral)
case _ => false
}) || agg.groupingExpressions.exists(e => isNotAttributeAndLiteral(e))
}.isDefined) || agg.groupingExpressions.exists(e => isNotAttributeAndLiteral(e))
}

private def shouldAddPreProjectForSort(sort: Sort): Boolean = {
Expand Down

0 comments on commit 4a9d369

Please sign in to comment.