From 9c97dc726fc70b0b0e75b1de42a35579e53ca88d Mon Sep 17 00:00:00 2001 From: Hyukjin Kwon Date: Fri, 26 Dec 2025 12:56:29 +0900 Subject: [PATCH] Remove trace$calls %||% trace$call once rlang > 0.4.11 is released --- r/R/metadata.R | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/r/R/metadata.R b/r/R/metadata.R index 206a18d09ff..dbc8c6b6390 100644 --- a/r/R/metadata.R +++ b/r/R/metadata.R @@ -188,8 +188,7 @@ apply_arrow_r_metadata <- function(x, r_metadata) { # we cannot apply this row-level metadata, since the order of the rows is # not guaranteed to be the same, so don't even try, but warn what's going on trace <- trace_back() - # TODO: remove `trace$calls %||% trace$call` once rlang > 0.4.11 is released - in_dplyr_collect <- any(map_lgl(trace$calls %||% trace$call, function(x) { + in_dplyr_collect <- any(map_lgl(trace$call, function(x) { grepl("collect\\.([aA]rrow|Dataset)", x)[[1]] })) if (in_dplyr_collect) { @@ -296,8 +295,7 @@ arrow_attributes <- function(x, only_top_level = FALSE) { # we cannot apply this row-level metadata, since the order of the rows is # not guaranteed to be the same, so don't even try, but warn what's going on trace <- trace_back() - # TODO: remove `trace$calls %||% trace$call` once rlang > 0.4.11 is released - in_dataset_write <- any(map_lgl(trace$calls %||% trace$call, function(x) { + in_dataset_write <- any(map_lgl(trace$call, function(x) { grepl("write_dataset", x, fixed = TRUE)[[1]] })) if (in_dataset_write) {