gengliangwang commented on code in PR #41429:
URL: https://github.com/apache/spark/pull/41429#discussion_r1228958219
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -2176,7 +2188,18 @@ class AstBuilder extends
SqlBaseParserBaseVisitor[AnyRef] with SQLConfHelper wit
val name = ctx.functionName.getText
val isDistinct = Option(ctx.setQuantifier()).exists(_.DISTINCT != null)
// Call `toSeq`, otherwise `ctx.argument.asScala.map(expression)` is
`Buffer` in Scala 2.13
- val arguments = ctx.argument.asScala.map(expression).toSeq match {
+ val arguments = ctx.argument.asScala.map { e =>
+ Option(e.namedArgumentExpression).map { n =>
Review Comment:
Shall we move this to a function for better readability?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]