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 2020/09/28 16:11:22 UTC

[GitHub] [spark] huaxingao commented on a change in pull request #29837: [SPARK-32463][SQL][DOCS] SQL data type compatibility

huaxingao commented on a change in pull request #29837:
URL: https://github.com/apache/spark/pull/29837#discussion_r496069671



##########
File path: docs/sql-ref-datatypes.md
##########
@@ -314,3 +314,33 @@ SELECT COUNT(*), c2 FROM test GROUP BY c2;
 |        3| Infinity|
 +---------+---------+
 ```
+
+#### Data type compatibility
+
+The following is the hierarchy of data type compatibility. In an operation involving different and compatible data types, these will be promoted to the lowest common top type to perform the operation.
+
+For example, if you have an add operation between an integer and a float, the integer will be treated as a float, the least common compatible type, resulting the operation in a float.
+
+The most common operations where this hierarchy is applied are:

Review comment:
       I guess maybe keep the current Hierarchy compatible types table because it shows the best to worst order, and also add a matrix format data conversion table like Oracle doc? IBM doc actually has two tables, one for Data Type Conversion Precedence List, the other is for casting between data types.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org