yeshengm commented on a change in pull request #24749: [SPARK-27890][SQL]
Improve SQL parser error message for identifier with hyphens
URL: https://github.com/apache/spark/pull/24749#discussion_r290099865
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -1386,7 +1387,7 @@ class AstBuilder(conf: SQLConf) extends
SqlBaseBaseVisitor[AnyRef] with Logging
* Create a function database (optional) and name pair.
*/
protected def visitFunctionName(ctx: QualifiedNameContext):
FunctionIdentifier = {
- ctx.identifier().asScala.map(_.getText) match {
+ ctx.identifier.asScala.map(_.getText) match {
Review comment:
Nope. Since qualified names can be used in expressions, we can't
differentiate cases such as `a - my-func(args)` and `a - my - func(args)`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]