From 3093ad68d2a3c6bab9c1605381d27e700766be22 Mon Sep 17 00:00:00 2001 From: exmy Date: Tue, 1 Oct 2024 15:22:29 +0200 Subject: [PATCH] [MINOR] Fix a typo in First aggregate expression ### What changes were proposed in this pull request? Find a typo for the comment on code `mergeExpressions` of `First` aggregate expression, fix from `first.right` to `first.left`. ### Why are the changes needed? Fix typo, it's confused. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? N.A ### Was this patch authored or co-authored using generative AI tooling? No Closes #48298 from exmy/fix-comment. Authored-by: exmy Signed-off-by: Max Gekk --- .../apache/spark/sql/catalyst/expressions/aggregate/First.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala index 4fe00099ddc91..9a39a6fe98796 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/First.scala @@ -104,7 +104,7 @@ case class First(child: Expression, ignoreNulls: Boolean) override lazy val mergeExpressions: Seq[Expression] = { // For first, we can just check if valueSet.left is set to true. If it is set - // to true, we use first.right. If not, we use first.right (even if valueSet.right is + // to true, we use first.left. If not, we use first.right (even if valueSet.right is // false, we are safe to do so because first.right will be null in this case). Seq( /* first = */ If(valueSet.left, first.left, first.right),