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/03/14 04:39:28 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #35831: [SPARK-38539][SQL][DOCS] Add document for ToNumber for DecimalFormat's compatibility

HyukjinKwon commented on a change in pull request #35831:
URL: https://github.com/apache/spark/pull/35831#discussion_r825587843



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/numberFormatExpressions.scala
##########
@@ -52,6 +52,11 @@ import org.apache.spark.unsafe.types.UTF8String
       > SELECT _FUNC_('12,454.8-', '99G999D9S');
        -12454.8
   """,
+  note = """
+    ToNumber has better compatibility with number format based on the underlying implementation.

Review comment:
       ```suggestion
       `to_number` has better compatibility with number format based on the underlying implementation.
   ```
   
   Let's use `to_number` too since this is user-facing docs.

##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/numberFormatExpressions.scala
##########
@@ -52,6 +52,11 @@ import org.apache.spark.unsafe.types.UTF8String
       > SELECT _FUNC_('12,454.8-', '99G999D9S');
        -12454.8
   """,
+  note = """
+    ToNumber has better compatibility with number format based on the underlying implementation.
+    For example: to_number('1,11,6.11', '000,,0.00') works good and returns 1116.11. Please see

Review comment:
       ```suggestion
       For example: `to_number('1,11,6.11', '000,,0.00')` works good and returns 1116.11. Please see
   ```




-- 
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