You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/14 14:28:31 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #12152: ARROW-15123: [R] CSV dataset file header read in as data

nealrichardson commented on a change in pull request #12152:
URL: https://github.com/apache/arrow/pull/12152#discussion_r784885514



##########
File path: r/R/query-engine.R
##########
@@ -22,7 +22,12 @@ do_exec_plan <- function(.data) {
 
   # TODO (ARROW-14289): make the head/tail methods return RBR not Table
   if (inherits(tab, "RecordBatchReader")) {
-    tab <- tab$read_table()
+    tryCatch(
+      tab <- tab$read_table(),
+      error = function(e) {
+        handle_csv_read_error(e, tab$schema)

Review comment:
       I think you want this check higher up, in `collect.arrow_dplyr_query`, around the `do_exec_plan()` call. It feels fragile and out of place here.




-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org