Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebacher committed Jun 10, 2024
1 parent 0dbb723 commit a3fbc50
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/dataframe__frame.R
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ DataFrame_write_csv = function(
float_precision = NULL,
null_values = "",
quote_style = "necessary") {
file = path.expand(file)
.pr$DataFrame$write_csv(
self,
file, include_bom, include_header, separator, line_terminator, quote,
Expand Down Expand Up @@ -1998,6 +1999,7 @@ DataFrame_write_ipc = function(
compression = c("uncompressed", "zstd", "lz4"),
...,
future = FALSE) {
file = path.expand(file)
if (isTRUE(future)) {
warning("The `future` parameter of `$write_ipc()` is considered unstable.")
}
Expand Down Expand Up @@ -2034,6 +2036,7 @@ DataFrame_write_parquet = function(
statistics = FALSE,
row_group_size = NULL,
data_pagesize_limit = NULL) {
file = path.expand(file)
.pr$DataFrame$write_parquet(
self,
file,
Expand Down Expand Up @@ -2073,6 +2076,7 @@ DataFrame_write_json = function(
...,
pretty = FALSE,
row_oriented = FALSE) {
file = path.expand(file)
.pr$DataFrame$write_json(self, file, pretty, row_oriented) |>
unwrap("in $write_json():")

Expand All @@ -2094,6 +2098,7 @@ DataFrame_write_json = function(
#'
#' pl$read_ndjson(destination)
DataFrame_write_ndjson = function(file) {
file = path.expand(file)
.pr$DataFrame$write_ndjson(self, file) |>
unwrap("in $write_ndjson():")

Expand Down
1 change: 1 addition & 0 deletions R/io_csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ check_is_link = function(path, reuse_downloaded, raise_error = FALSE) {
if (is.na(path)) {
return(NULL)
}
path = path.expand(path)
if (!file.exists(path)) {
con = NULL

Expand Down
1 change: 1 addition & 0 deletions R/io_ipc.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pl_scan_ipc = function(
row_index_offset = 0L,
rechunk = FALSE,
cache = TRUE) {
source = path.expand(source)
import_arrow_ipc(
source,
n_rows,
Expand Down
1 change: 1 addition & 0 deletions R/io_parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pl_scan_parquet = function(
storage_options = NULL,
use_statistics = TRUE,
cache = TRUE) {
source = path.expand(source)
new_from_parquet(
path = source,
n_rows = n_rows,
Expand Down
4 changes: 4 additions & 0 deletions R/lazyframe__lazy.R
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ LazyFrame_sink_parquet = function(
slice_pushdown = TRUE,
no_optimization = FALSE,
inherit_optimization = FALSE) {
path = path.expand(path)
if (isTRUE(no_optimization)) {
predicate_pushdown = FALSE
projection_pushdown = FALSE
Expand Down Expand Up @@ -750,6 +751,7 @@ LazyFrame_sink_ipc = function(
slice_pushdown = TRUE,
no_optimization = FALSE,
inherit_optimization = FALSE) {
path = path.expand(path)
if (isTRUE(no_optimization)) {
predicate_pushdown = FALSE
projection_pushdown = FALSE
Expand Down Expand Up @@ -832,6 +834,7 @@ LazyFrame_sink_csv = function(
slice_pushdown = TRUE,
no_optimization = FALSE,
inherit_optimization = FALSE) {
path = path.expand(path)
if (isTRUE(no_optimization)) {
predicate_pushdown = FALSE
projection_pushdown = FALSE
Expand Down Expand Up @@ -909,6 +912,7 @@ LazyFrame_sink_ndjson = function(
slice_pushdown = TRUE,
no_optimization = FALSE,
inherit_optimization = FALSE) {
path = path.expand(path)
if (isTRUE(no_optimization)) {
predicate_pushdown = FALSE
projection_pushdown = FALSE
Expand Down

0 comments on commit a3fbc50

Please sign in to comment.