ianmcook commented on a change in pull request #9952:
URL: https://github.com/apache/arrow/pull/9952#discussion_r610936871



##########
File path: r/R/arrow-datum.R
##########
@@ -22,6 +22,7 @@
 ArrowDatum <- R6Class("ArrowDatum", inherit = ArrowObject,
   public = list(
     cast = function(target_type, safe = TRUE, ...) {
+      target_type <- unmask_type_fun(enexpr(target_type)) %||% target_type

Review comment:
       My first attempt to solve this with quosures was unsuccessful for two 
reasons:
   - There are checks for the nullity of `type` in the code would need to all 
be rewritten to work with quosures, and simply using `quo_is_null()` is not 
sufficient for this.
   - Some of the functions that defuse `type` call other functions that defuse 
`type`, so we end up with quosures of quosures. rlang does not appear to have 
facilities for easily solving this problem. See 
https://community.rstudio.com/t/how-to-avoid-creating-quosures-of-quosures/101420
   
   I will remove all the masking-prevention code for now and we can revisit in 
ARROW-12322.




-- 
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:
us...@infra.apache.org


Reply via email to