beliefer 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_r333916849
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/StringExpressionsSuite.scala
##########
@@ -840,6 +841,62 @@ class StringExpressionsSuite extends SparkFunSuite with
ExpressionEvalHelper {
Literal.create(null, IntegerType), Literal.create(null, IntegerType)),
null)
}
+ test("ToNumber") {
Review comment:
@MaxGekk Thanks for this review. I test the locale on Postgresql but 'L'
seems not works.
```
select to_number('USD34234.4350', 'L99999.0000'); // 34234.435
select to_number('EUR34234.4350', 'L99999.0000'); // 34234.435
select to_number('RY34234.4350', 'L99999.0000'); // 34234.435
```
Although 'RY ' is not a valid locale , the result is the same as the others .
----------------------------------------------------------------
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]