Repository navigation
[R] Expose ignore_extra_columns and pad_short_rows CSV parse options #51659
Copy link
Copy link
Open
Description
Describe the enhancement requested
Arrow C++ 26.0.0 adds two new arrow::csv::ParseOptions fields:
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() and CsvParseOptions$create() should accept both, and csv.cpp should pass them through:
Lines 735 to 753 in 9479e68
| 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 | |
| ) | |
| ) |
Lines 64 to 72 in 9479e68
| 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
Reactions are currently unavailable
Activity
apacheGH-51659: [R] Expose ignore_extra_columns and pad_short_rows CS…
bigdatadeveloper8 commentedon Oct 11, 2026
hello @thisisnic is this issue still open?
apacheGH-51659: [R] Address review comments for CSV parse options