Github user felixcheung commented on a diff in the pull request:

    https://github.com/apache/spark/pull/16248#discussion_r91891490
  
    --- Diff: R/pkg/R/utils.R ---
    @@ -851,3 +851,12 @@ rbindRaws <- function(inputData){
       out[!rawcolumns] <- lapply(out[!rawcolumns], unlist)
       out
     }
    +
    +# Get basename without extension from URL
    +basenameSansExtFromUrl <- function(url) {
    --- End diff --
    
    My concern was to bring in another dependencies just for this (it's in the 
tools)
    
    The regex was in fact copy-paste from file_path_sans_ext (hence the name) 
except for the compression part which is what you are referring to.
    I could copy that over as well. Would you prefer `compression` be TRUE 
(default is FALSE) to remove `.gz`?
    
    ```
    > library(tools)
    > file_path_sans_ext
    function (x, compression = FALSE)
    {
        if (compression)
            x <- sub("[.](gz|bz2|xz)$", "", x)
        sub("([^.]+)\\.[[:alnum:]]+$", "\\1", x)
    }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to