You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/04/19 03:25:32 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #35269: [SPARK-28516][SQL] Data Type Formatting Functions: `to_char`
cloud-fan commented on code in PR #35269:
URL: https://github.com/apache/spark/pull/35269#discussion_r852561943
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/NumberFormatter.scala:
##########
@@ -149,6 +156,21 @@ class NumberFormatter(originNumberFormat: String, isParse: Boolean = true) exten
} else if (invalidSignPosition(DOLLAR_SIGN)) {
TypeCheckResult.TypeCheckFailure(
nonFistOrLastCharInNumberFormatError(s"'$DOLLAR_SIGN'"))
+ } else if (!isParse && normalizedNumberFormat.exists(_ == COMMA_SIGN)) {
Review Comment:
Can we re-implement `to_char` with the new parser we added for `to_number`? These 2 functions must be consistent.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org