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/22 14:15:27 UTC

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

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



##########
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 believe we have much more complicated rules than here ..  see `TypeCoercion.scala`.




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