MaxGekk commented on a change in pull request #25963: [SPARK-28137][SQL] Add Postgresql function to_number. URL: https://github.com/apache/spark/pull/25963#discussion_r333037092
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala ########## @@ -2267,6 +2267,215 @@ case class FormatNumber(x: Expression, d: Expression) override def prettyName: String = "format_number" } +/** + * A function that converts string to numeric. + */ +// scalastyle:off line.size.limit +@ExpressionDescription( + usage = """ + _FUNC_(strExpr, patternExpr) - Convert a string to a number based on the pattern. + The pattern can consist of the following characters: + '9': digit position (can be dropped if insignificant) + '0': digit position (will not be dropped, even if insignificant) + '.': decimal point (only allowed once) + ',': group (thousands) separator + 'S': sign anchored to number (uses locale) Review comment: Could clarify from where it takes the `locale`. ---------------------------------------------------------------- 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]
