maropu commented on a change in pull request #31781:
URL: https://github.com/apache/spark/pull/31781#discussion_r589856805



##########
File path: docs/sql-ref-ansi-compliance.md
##########
@@ -72,16 +72,23 @@ The type conversion of Spark ANSI mode follows the syntax 
rules of section 6.13
 
 | Source\Target | Numeric | String | Date | Timestamp | Interval | Boolean | 
Binary | Array | Map | Struct |
 
|-----------|---------|--------|------|-----------|----------|---------|--------|-------|-----|--------|
-| Numeric   | Y       | Y      | N    | N         | N        | Y       | N     
 | N     | N   | N      |
-| String    | Y       | Y      | Y    | Y         | Y        | Y       | Y     
 | N     | N   | N      |
+| Numeric   | <span style="color:red">Y</span> | Y      | N    | N         | N 
       | Y       | N      | N     | N   | N      |
+| String    | <span style="color:red">Y</span> | Y | <span 
style="color:red">Y</span> | <span style="color:red">Y</span> | <span 
style="color:red">Y</span> | <span style="color:red">Y</span> | Y | N     | N   
| N      |
 | Date      | N       | Y      | Y    | Y         | N        | N       | N     
 | N     | N   | N      |
 | Timestamp | N       | Y      | Y    | Y         | N        | N       | N     
 | N     | N   | N      |
 | Interval  | N       | Y      | N    | N         | Y        | N       | N     
 | N     | N   | N      |
 | Boolean   | Y       | Y      | N    | N         | N        | Y       | N     
 | N     | N   | N      |
-| Binary    | Y       | N      | N    | N         | N        | N       | Y     
 | N     | N   | N      |
-| Array     | N       | N      | N    | N         | N        | N       | N     
 | Y     | N   | N      |
-| Map       | N       | N      | N    | N         | N        | N       | N     
 | N     | Y   | N      |
-| Struct    | N       | N      | N    | N         | N        | N       | N     
 | N     | N   | Y      |
+| Binary    | N       | Y      | N    | N         | N        | N       | Y     
 | N     | N   | N      |
+| Array     | N       | N      | N    | N         | N        | N       | N     
 | <span style="color:red">Y</span> | N   | N      |
+| Map       | N       | N      | N    | N         | N        | N       | N     
 | N     | <span style="color:red">Y</span> | N      |
+| Struct    | N       | N      | N    | N         | N        | N       | N     
 | N     | N   | <span style="color:red">Y</span> |
+
+In the table above, all the `CAST`s that can cause runtime exceptions are 
marked as red <span style="color:red">Y</span>:
+* CAST(Numeric AS Numeric): raise a overflow exception if the value is out of 
the target data type's range.

Review comment:
       `a overflow` -> `an overflow`

##########
File path: docs/sql-ref-ansi-compliance.md
##########
@@ -72,16 +72,23 @@ The type conversion of Spark ANSI mode follows the syntax 
rules of section 6.13
 
 | Source\Target | Numeric | String | Date | Timestamp | Interval | Boolean | 
Binary | Array | Map | Struct |
 
|-----------|---------|--------|------|-----------|----------|---------|--------|-------|-----|--------|
-| Numeric   | Y       | Y      | N    | N         | N        | Y       | N     
 | N     | N   | N      |
-| String    | Y       | Y      | Y    | Y         | Y        | Y       | Y     
 | N     | N   | N      |
+| Numeric   | <span style="color:red">Y</span> | Y      | N    | N         | N 
       | Y       | N      | N     | N   | N      |

Review comment:
       For following the universal design, could we use a bold char or `*` 
instead? Or use the combination of them?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to