From 7f1c18437433f6bb4fe1482f0e1259d912a2b2bf Mon Sep 17 00:00:00 2001 From: Romain Francois Date: Thu, 26 Sep 2019 08:25:46 +0200 Subject: [PATCH] align arguments following tidyverse style guide --- r/R/parquet.R | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/r/R/parquet.R b/r/R/parquet.R index e569061f50242..d4d1617e97630 100644 --- a/r/R/parquet.R +++ b/r/R/parquet.R @@ -241,30 +241,38 @@ ParquetFileWriter$create <- function( #' #' } #' @export -write_parquet <- function( - table, - sink, chunk_size = NULL, +write_parquet <- function(table, + sink, + chunk_size = NULL, - # writer properties - version = NULL, compression = NULL, compression_level = NULL, use_dictionary = NULL, write_statistics = NULL, data_page_size = NULL, - properties = ParquetWriterProperties$create( - table, + # writer properties + version = NULL, + compression = NULL, + compression_level = NULL, + use_dictionary = NULL, + write_statistics = NULL, + data_page_size = NULL, - version = version, - compression = compression, - compression_level = compression_level, - use_dictionary = use_dictionary, - write_statistics = write_statistics, - data_page_size = data_page_size - ), + properties = ParquetWriterProperties$create( + table, + version = version, + compression = compression, + compression_level = compression_level, + use_dictionary = use_dictionary, + write_statistics = write_statistics, + data_page_size = data_page_size + ), - # arrow writer properties - use_deprecated_int96_timestamps = FALSE, coerce_timestamps = NULL, allow_truncated_timestamps = FALSE, - arrow_properties = ParquetArrowWriterProperties$create( - use_deprecated_int96_timestamps = use_deprecated_int96_timestamps, - coerce_timestamps = coerce_timestamps, - allow_truncated_timestamps = allow_truncated_timestamps - ) + # arrow writer properties + use_deprecated_int96_timestamps = FALSE, + coerce_timestamps = NULL, + allow_truncated_timestamps = FALSE, + + arrow_properties = ParquetArrowWriterProperties$create( + use_deprecated_int96_timestamps = use_deprecated_int96_timestamps, + coerce_timestamps = coerce_timestamps, + allow_truncated_timestamps = allow_truncated_timestamps + ) ) { table <- to_arrow(table)