You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Ian Cook (Jira)" <ji...@apache.org> on 2021/01/11 18:56:00 UTC

[jira] [Commented] (ARROW-10463) [R] Better messaging for currently unsupported CSV options in open_dataset

    [ https://issues.apache.org/jira/browse/ARROW-10463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17262867#comment-17262867 ] 

Ian Cook commented on ARROW-10463:
----------------------------------

[PR #9143|https://github.com/apache/arrow/pull/9143] improves the error message that occurs when the user specifies unsupported readr-style options. The example above would yield this error message:
{code:r}
 Error: The following option is supported in "read_delim_arrow" functions but not yet supported here: "na" 
{code}
The added code matches both full and partial option names and improves handling of several other modes of unsupported options.


> [R] Better messaging for currently unsupported CSV options in open_dataset
> --------------------------------------------------------------------------
>
>                 Key: ARROW-10463
>                 URL: https://issues.apache.org/jira/browse/ARROW-10463
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: R
>    Affects Versions: 2.0.0
>            Reporter: Gabriel Bassett
>            Assignee: Ian Cook
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> While read_csv_arrow()'s signature matches readr,  the readr_to_csv_parse_options() function (called by way of open_dataset()) only appears to capture a subset of those options:
> (https://github.com/apache/arrow/blob/883eb572bc64430307112895976ba79df10c8c7d/r/R/csv.R#L464)
> {code:java}
> readr_to_csv_parse_options <- function(delim = ",",
>  quote = '"',
>  escape_double = TRUE,
>  escape_backslash = FALSE,
>  skip_empty_rows = TRUE){code}
> I ran into this trying to use a non-standard 'na' value:
>  
> {code:java}
> open_dataset("/path/to/csv/directory/", schema = sch, partitioning=NULL, format="csv", delim=";", na="\\N", escape_backslash=TRUE, escape_double=FALSE`)
> Error in readr_to_csv_parse_options(...) : unused argument (na = "\\N")
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)