dtenedor commented on code in PR #41429:
URL: https://github.com/apache/spark/pull/41429#discussion_r1226984342
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -2176,7 +2185,15 @@ 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 =>
+ if (e.namedArgumentExpression != null) {
+ val key = e.namedArgumentExpression.key.strictIdentifier
Review Comment:
I think you can just use `e.namedArgumentExpression.key.getText` for this
since it is a single-part identifier in the grammar.
--
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]