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 2021/04/05 21:26:31 UTC

[GitHub] [arrow] nealrichardson commented on a change in pull request #9893: ARROW-11766: [R] Better handling for missing compression codecs on Linux

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



##########
File path: r/tests/testthat/test-feather.R
##########
@@ -196,3 +196,17 @@ test_that("Character vectors > 2GB can write to feather", {
 })
 
 unlink(feather_file)
+
+ft_file <- test_path("golden-files/data-arrow_2.0.0_lz4.feather")
+

Review comment:
       There should at least be a test for all lines of code you added. I don't see any parquet tests.
   
   Also, you might want to test what happens if you pass an invalid file (like, what if you did `read_feather(parquet_file)`?)

##########
File path: r/R/parquet.R
##########
@@ -52,10 +52,16 @@ read_parquet <- function(file,
     schema <- reader$GetSchema()
     names <- names(schema)
     indices <- match(vars_select(names, !!col_select), names) - 1L
-    tab <- reader$ReadTable(indices)
+    tab <- tryCatch(
+      reader$ReadTable(indices),
+      error = function(e) { read_compressed_error(e) }

Review comment:
       ```suggestion
         error = read_compressed_error
   ```




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

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