Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion r/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Imports:
methods,
purrr,
R6,
rlang,
rlang (>= 1.0.0),
stats,
tidyselect (>= 1.0.0),
utils,
Expand Down
30 changes: 18 additions & 12 deletions r/tests/testthat/_snaps/dataset-write.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,54 @@

Code
write_dataset(df, dst_dir, format = "feather", compression = "snappy")
Error <rlang_error>
`compression` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `compression` is not a valid argument for your chosen `format`.
i You could try using `codec` instead of `compression`.
i Supported arguments: `use_legacy_format`, `metadata_version`, `codec`, and `null_fallback`.

---

Code
write_dataset(df, dst_dir, format = "feather", nonsensical_arg = "blah-blah")
Error <rlang_error>
`nonsensical_arg` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `nonsensical_arg` is not a valid argument for your chosen `format`.
i Supported arguments: `use_legacy_format`, `metadata_version`, `codec`, and `null_fallback`.

---

Code
write_dataset(df, dst_dir, format = "arrow", nonsensical_arg = "blah-blah")
Error <rlang_error>
`nonsensical_arg` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `nonsensical_arg` is not a valid argument for your chosen `format`.
i Supported arguments: `use_legacy_format`, `metadata_version`, `codec`, and `null_fallback`.

---

Code
write_dataset(df, dst_dir, format = "ipc", nonsensical_arg = "blah-blah")
Error <rlang_error>
`nonsensical_arg` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `nonsensical_arg` is not a valid argument for your chosen `format`.
i Supported arguments: `use_legacy_format`, `metadata_version`, `codec`, and `null_fallback`.

---

Code
write_dataset(df, dst_dir, format = "csv", nonsensical_arg = "blah-blah")
Error <rlang_error>
`nonsensical_arg` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `nonsensical_arg` is not a valid argument for your chosen `format`.
i Supported arguments: `include_header` and `batch_size`.

---

Code
write_dataset(df, dst_dir, format = "parquet", nonsensical_arg = "blah-blah")
Error <rlang_error>
`nonsensical_arg` is not a valid argument for your chosen `format`.
Condition
Error in `check_additional_args()`:
! `nonsensical_arg` is not a valid argument for your chosen `format`.
i Supported arguments: `chunk_size`, `version`, `compression`, `compression_level`, `use_dictionary`, `write_statistics`, `data_page_size`, `use_deprecated_int96_timestamps`, `coerce_timestamps`, and `allow_truncated_timestamps`.

6 changes: 3 additions & 3 deletions r/tests/testthat/_snaps/dplyr-glimpse.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@

Code
example_data %>% as_record_batch_reader() %>% glimpse()
Message <simpleMessage>
Message
Cannot glimpse() data from a RecordBatchReader because it can only be read one time; call `as_arrow_table()` to consume it first.
Output
RecordBatchReader
Expand All @@ -103,7 +103,7 @@

Code
example_data %>% as_record_batch_reader() %>% select(int) %>% glimpse()
Message <simpleMessage>
Message
Cannot glimpse() data from a RecordBatchReader because it can only be read one time. Call `compute()` to evaluate the query first.
Output
RecordBatchReader (query)
Expand Down Expand Up @@ -131,7 +131,7 @@

Code
ds %>% summarize(max(int)) %>% glimpse()
Message <simpleMessage>
Message
This query requires a full table scan, so glimpse() may be expensive. Call `compute()` to evaluate the query first.
Output
FileSystemDataset (query)
Expand Down
25 changes: 15 additions & 10 deletions r/tests/testthat/_snaps/dplyr-join.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,39 @@

Code
left_join(arrow_table(example_data), arrow_table(example_data), by = "made_up_colname")
Error <rlang_error>
Join columns must be present in data.
Condition
Error in `handle_join_by()`:
! Join columns must be present in data.
x `made_up_colname` not present in x.
x `made_up_colname` not present in y.

---

Code
left_join(arrow_table(example_data), arrow_table(example_data), by = c(int = "made_up_colname"))
Error <rlang_error>
Join columns must be present in data.
Condition
Error in `handle_join_by()`:
! Join columns must be present in data.
x `made_up_colname` not present in y.

---

Code
left_join(arrow_table(example_data), arrow_table(example_data), by = c(
made_up_colname = "int"))
Error <rlang_error>
Join columns must be present in data.
Condition
Error in `handle_join_by()`:
! Join columns must be present in data.
x `made_up_colname` not present in x.

---

Code
left_join(arrow_table(example_data), arrow_table(example_data), by = c(
"made_up_colname1", "made_up_colname2"))
Error <rlang_error>
Join columns must be present in data.
Condition
Error in `handle_join_by()`:
! Join columns must be present in data.
x `made_up_colname1` and `made_up_colname2` not present in x.
x `made_up_colname1` and `made_up_colname2` not present in y.

Expand All @@ -39,8 +43,9 @@
Code
left_join(arrow_table(example_data), arrow_table(example_data), by = c(
made_up_colname1 = "made_up_colname2"))
Error <rlang_error>
Join columns must be present in data.
Condition
Error in `handle_join_by()`:
! Join columns must be present in data.
x `made_up_colname1` not present in x.
x `made_up_colname2` not present in y.