Skip to content

Commit

Permalink
Normalize whitespace in R cookbooks
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Oct 29, 2024
1 parent 59c98c2 commit 2ccc2f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions r/content/specify_data_types_and_schemas.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@

## Introduction

As discussed in previous chapters, Arrow automatically infers the most
appropriate data type when reading in data or converting R objects to Arrow
objects. However, you might want to manually tell Arrow which data types to
use, for example, to ensure interoperability with databases and data warehouse
As discussed in previous chapters, Arrow automatically infers the most
appropriate data type when reading in data or converting R objects to Arrow
objects. However, you might want to manually tell Arrow which data types to
use, for example, to ensure interoperability with databases and data warehouse
systems. This chapter includes recipes for:

* changing the data types of existing Arrow objects
* defining data types during the process of creating Arrow objects

A table showing the default mappings between R and Arrow data types can be found
A table showing the default mappings between R and Arrow data types can be found
in [R data type to Arrow data type mappings](https://arrow.apache.org/docs/r/articles/arrow.html#r-to-arrow).

A table containing Arrow data types, and their R equivalents can be found in
A table containing Arrow data types, and their R equivalents can be found in
[Arrow data type to R data type mapping](https://arrow.apache.org/docs/r/articles/arrow.html#arrow-to-r).

## Update data type of an existing Arrow Array
Expand Down Expand Up @@ -63,7 +63,7 @@ test_that("cast_array works as expected", {

### Discussion

There are some data types which are not compatible with each other. Errors will
There are some data types which are not compatible with each other. Errors will
occur if you try to cast between incompatible data types.

```{r, incompat, eval = FALSE}
Expand Down Expand Up @@ -122,7 +122,7 @@ test_that("cast_table works as expected", {

## Specify data types when creating an Arrow table from an R object

You want to manually specify Arrow data types when converting an object from a
You want to manually specify Arrow data types when converting an object from a
data frame to an Arrow object.

### Solution
Expand Down Expand Up @@ -187,4 +187,3 @@ test_that("use_schema_dataset works as expected", {
```{r, include=FALSE}
unlink("oscars_data", recursive = TRUE)
```

2 changes: 1 addition & 1 deletion r/content/tables.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,4 @@ You can perform these window aggregate operations on Arrow tables by:
- Computing the aggregation separately, and joining the result
- Passing the data to DuckDB, and use the DuckDB query engine to perform the operations

Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the [Arrow blog post](https://arrow.apache.org/blog/2021/12/03/arrow-duckdb/).
Arrow supports zero-copy integration with DuckDB, and DuckDB can query Arrow datasets directly and stream query results back to Arrow. This integreation uses zero-copy streaming of data between DuckDB and Arrow and vice versa so that you can compose a query using both together, all the while not paying any cost to (re)serialize the data when you pass it back and forth. This is especially useful in cases where something is supported in one of Arrow or DuckDB query engines but not the other. You can find more information about this integration on the [Arrow blog post](https://arrow.apache.org/blog/2021/12/03/arrow-duckdb/).

0 comments on commit 2ccc2f0

Please sign in to comment.