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

   @abduazizR It looks like that issue is restricted to `right_join()` only - 
see the reprex below:
   
   ``` r
   library(arrow)
   library(dplyr)
   
   tbl <- tibble::tibble(x = 1:10, y = 1:10)
   tbl2 <- tibble::tibble(y = 3:5, z = c("a", "b", "c"))
   
   # right join using dplyr
   tbl2 %>%
     right_join(tbl)
   #> Joining, by = "y"
   #> # A tibble: 10 × 3
   #>        y z         x
   #>    <int> <chr> <int>
   #>  1     3 a         3
   #>  2     4 b         4
   #>  3     5 c         5
   #>  4     1 <NA>      1
   #>  5     2 <NA>      2
   #>  6     6 <NA>      6
   #>  7     7 <NA>      7
   #>  8     8 <NA>      8
   #>  9     9 <NA>      9
   #> 10    10 <NA>     10
   
   # right join using Arrow
   tbl2 %>%
     arrow_table() %>%
     right_join(tbl) %>%
     collect()
   #> # A tibble: 10 × 3
   #>        y z         x
   #>    <int> <chr> <int>
   #>  1     3 a         3
   #>  2     4 b         4
   #>  3     5 c         5
   #>  4    NA <NA>      1
   #>  5    NA <NA>      2
   #>  6    NA <NA>      6
   #>  7    NA <NA>      7
   #>  8    NA <NA>      8
   #>  9    NA <NA>      9
   #> 10    NA <NA>     10
   
   # left join using dplyr
   tbl %>%
     left_join(tbl2)
   #> Joining, by = "y"
   #> # A tibble: 10 × 3
   #>        x     y z    
   #>    <int> <int> <chr>
   #>  1     1     1 <NA> 
   #>  2     2     2 <NA> 
   #>  3     3     3 a    
   #>  4     4     4 b    
   #>  5     5     5 c    
   #>  6     6     6 <NA> 
   #>  7     7     7 <NA> 
   #>  8     8     8 <NA> 
   #>  9     9     9 <NA> 
   #> 10    10    10 <NA>
   
   # left join using Arrow
   tbl %>%
     arrow_table() %>%
     left_join(tbl2) %>%
     collect()
   #> # A tibble: 10 × 3
   #>        x     y z    
   #>    <int> <int> <chr>
   #>  1     3     3 a    
   #>  2     4     4 b    
   #>  3     5     5 c    
   #>  4     1     1 <NA> 
   #>  5     2     2 <NA> 
   #>  6     6     6 <NA> 
   #>  7     7     7 <NA> 
   #>  8     8     8 <NA> 
   #>  9     9     9 <NA> 
   #> 10    10    10 <NA>
   ```
   


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