thisisnic opened a new pull request, #34217:
URL: https://github.com/apache/arrow/pull/34217

   Before this PR:
   
   ``` r
   library(arrow)
   tf <- tempfile()
   df <- tibble::tibble(x = 1, b = 2)
   write_csv_arrow(df, tf)
   open_csv_dataset(tf, schema = schema(x = int64(), y = int64()), skip = 1)
   #> Error in `check_schema()`:
   #> ! Values in `column_names` must match `schema` field names
   #> ✖ `x` and `y` not present in `column_names`
   
   #> Backtrace:
   #>     ▆
   #>  1. └─arrow (local) `<fn>`(...)
   #>  2.   └─arrow::open_dataset(...)
   #>  3.     └─DatasetFactory$create(...)
   #>  4.       └─FileFormat$create(match.arg(format), ...)
   #>  5.         └─CsvFileFormat$create(schema = schema, ...)
   #>  6.           └─arrow:::check_schema(options[["schema"]], 
options[["read_options"]]$column_names)
   #>  7.             └─rlang::abort(...)
   ```
   
   After this PR:
   
   ``` r
   library(arrow)
   tf <- tempfile()
   df <- tibble::tibble(x = 1, b = 2)
   write_csv_arrow(df, tf)
   open_csv_dataset(tf, schema = schema(x = int64(), y = int64()), skip = 1)
   #> FileSystemDataset with 1 csv file
   #> x: int64
   #> y: int64
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to