fsaintjacques commented on a change in pull request #7441:
URL: https://github.com/apache/arrow/pull/7441#discussion_r441010286



##########
File path: r/vignettes/arrow.Rmd
##########
@@ -86,7 +88,73 @@ to other applications and services that use Arrow. One 
example is Spark: the
 move data to and from Spark, yielding [significant performance
 gains](http://arrow.apache.org/blog/2019/01/25/r-spark-improvements/).
 
-# Class structure and package conventions
+# Internals
+
+## Mapping of R <--> Arrow types
+
+Arrow has a rich data type system that includes direct parallels with R's data 
types and much more.
+
+In the tables, entries with a `-` are not currently implemented.
+
+### R to Arrow
+
+| R type                   | Arrow type |
+|--------------------------|------------|
+| logical                  | boolean    |
+| integer                  | int32      |
+| double ("numeric")       | float64    |
+| character                | utf8       |
+| factor                   | dictionary |
+| raw                      | uint8      |
+| Date                     | date32     |
+| POSIXct                  | timestamp  |
+| POSIXlt                  | -          |
+| data.frame               | struct     |
+| list^+^                  | list       |
+| bit64::integer64         | int64      |
+| difftime                 | time32     |
+| vctrs::vctrs_unspecified | null       |
+
+^+^: Only lists where all elements are the same type are able to be translated 
to Arrow list type (which is a "list of" some type).
+
+### Arrow to R
+
+| Arrow type        | R type                   |
+|-------------------|--------------------------|
+| boolean           | logical                  |
+| int8              | integer                  |
+| int16             | integer                  |
+| int32             | integer                  |
+| int64             | bit64::integer64         |
+| uint8             | integer                  |
+| uint16            | integer                  |
+| uint32            | double                   |

Review comment:
       @romainfrancois, why not using the same as int64_t?




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


Reply via email to