thisisnic commented on issue #15247:
URL: https://github.com/apache/arrow/issues/15247#issuecomment-1415404352

   Thanks for reporting this @OfekShilon!
   
   I had a look at our other file writing functions to have a look at 
behaviour, and this isn't just restricted to those.  Interestingly, 
`readr::write_csv()` has the same behaviour.
   
   ``` r
   df <- data.frame(a=1:3,b=4:6)
   names(df) <- NULL
   arrow::write_feather(x=df, sink="~/tmp/df")
   #> Error: Invalid input type, expected 'character' actual 'NULL'
   arrow::write_csv_arrow(df, "tst.csv")
   #> Error in `value[[3L]]()`:
   #> ! x must be an object of class 'data.frame', 'RecordBatch', 'Dataset', 
'Table', or 'RecordBatchReader' not 'data.frame'.
   
   #> Backtrace:
   #>     ▆
   #>  1. └─arrow::write_csv_arrow(df, "tst.csv")
   #>  2.   └─base::tryCatch(...)
   #>  3.     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   #>  4.       └─base (local) tryCatchOne(expr, names, parentenv, 
handlers[[1L]])
   #>  5.         └─value[[3L]](cond)
   #>  6.           └─rlang::abort(...)
   arrow::write_parquet(df, "tst.csv")
   #> Error: Invalid input type, expected 'character' actual 'NULL'
   
   readr::write_csv(df, "tst.csv")
   #> Error: Invalid input type, expected 'character' actual 'NULL'
   ```
   
   Can I ask a bit more about the use case here, and the circumstances in which 
it's desirable to have a `data.frame` with NULL column names?


-- 
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