Describe the enhancement requested
Arrow C++ 26.0.0 adds two new arrow::csv::ParseOptions fields:
Neither can be set from R. csv_parse_options() and CsvParseOptions$create() should accept both, and csv.cpp should pass them through:
|
quote_char = '"', |
|
double_quote = TRUE, |
|
escaping = FALSE, |
|
escape_char = "\\", |
|
newlines_in_values = FALSE, |
|
ignore_empty_lines = TRUE |
|
) { |
|
csv___ParseOptions__initialize( |
|
list( |
|
delimiter = delimiter, |
|
quoting = quoting, |
|
quote_char = quote_char, |
|
double_quote = double_quote, |
|
escaping = escaping, |
|
escape_char = escape_char, |
|
newlines_in_values = newlines_in_values, |
|
ignore_empty_lines = ignore_empty_lines |
|
) |
|
) |
|
res->delimiter = cpp11::as_cpp<char>(options["delimiter"]); |
|
res->quoting = cpp11::as_cpp<bool>(options["quoting"]); |
|
res->quote_char = cpp11::as_cpp<char>(options["quote_char"]); |
|
res->double_quote = cpp11::as_cpp<bool>(options["double_quote"]); |
|
res->escape_char = cpp11::as_cpp<char>(options["escape_char"]); |
|
res->newlines_in_values = cpp11::as_cpp<bool>(options["newlines_in_values"]); |
|
res->ignore_empty_lines = cpp11::as_cpp<bool>(options["ignore_empty_lines"]); |
|
return res; |
|
} |
Component(s)
R
Describe the enhancement requested
Arrow C++ 26.0.0 adds two new
arrow::csv::ParseOptionsfields:ignore_extra_columns(GH-50967: [C++] Allow CSV reader to ignore extra columns in rows with more columns #51118): rows with more columns than expected have the extra columns dropped instead of erroring.pad_short_rows(GH-50925: [C++] Allow CSV reader to pad rows with missing trailing fields #50926): rows with fewer columns than expected are padded with nulls instead of erroring.Neither can be set from R.
csv_parse_options()andCsvParseOptions$create()should accept both, andcsv.cppshould pass them through:arrow/r/R/csv.R
Lines 735 to 753 in 9479e68
arrow/r/src/csv.cpp
Lines 64 to 72 in 9479e68
Component(s)
R