cloud-fan commented on code in PR #37486:
URL: https://github.com/apache/spark/pull/37486#discussion_r944153358
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala:
##########
@@ -1795,9 +1795,9 @@ class AstBuilder extends SqlBaseParserBaseVisitor[AnyRef]
with SQLConfHelper wit
cast
case SqlBaseParser.TRY_CAST =>
- // `TryCast` can only be user-specified and we don't need to set the
USER_SPECIFIED_CAST
- // tag, which is only used by `Cast`
- TryCast(expression(ctx.expression), dataType)
+ val cast = Cast(expression(ctx.expression), dataType, evalMode =
EvalMode.TRY)
+ cast.setTagValue(Cast.USER_SPECIFIED_CAST, true)
Review Comment:
do we need to set this? Cast with `TRY` mode can only be user specified
--
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]