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



##########
File path: r/R/util.R
##########
@@ -45,3 +45,16 @@ is_list_of <- function(object, class) {
 }
 
 empty_named_list <- function() structure(list(), .Names = character(0))
+
+read_compressed_error <- function(e) {
+  e <- as.character(e)
+  alg <- regmatches(e, gregexpr("(?<=\')(.*?)(?=\')", e, perl = TRUE))[[1]]

Review comment:
       I think this is more readable:
   
   ```suggestion
     alg <- sub(".*Support for codec '(.*)'.*", "\\1", e)
   ```




-- 
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:
[email protected]


Reply via email to