dtenedor commented on code in PR #36950:
URL: https://github.com/apache/spark/pull/36950#discussion_r903958488


##########
docs/sql-ref-number-pattern.md:
##########
@@ -19,4 +19,137 @@ license: |
   limitations under the License.
 ---
 
-TODO: Add the content of Number Patterns for Formatting and Parsing
+### Description
+
+Functions such as `to_number` and `try_to_number` support converting between 
values of string and
+Decimal type. Such functions accept format strings indicating how to map 
between these types.
+
+### Syntax
+
+Number format strings support the following syntax:
+
+```
+  { ' [ S ] [ L | $ ] 
+      [ 0 | 9 | G | , ] [...] 
+      [ . | D ] 
+      [ 0 | 9 ] [...] 
+      [ L | $ ] [ PR | MI | S ] ' }
+```
+
+### Elements
+
+Each number format string can contain the following elements (case 
insensitive):
+
+- **`0`** or **`9`**
+
+  Specifies an expected digit between `0` and `9`.
+
+  A `0` to the left of the decimal point indicates that at least this many 
digits must be present.

Review Comment:
   Sure, sounds good. Updated this to the docs here.



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

Reply via email to