paleolimbot commented on code in PR #19706:
URL: https://github.com/apache/arrow/pull/19706#discussion_r1072256005
##########
r/tests/testthat/test-dplyr-query.R:
##########
@@ -759,3 +759,27 @@ test_that("Can use nested field refs", {
filter(nested > 7)
)
})
+
+test_that("Use struct_field for $ on non-field-ref", {
+ compare_dplyr_binding(
+ .input %>%
+ mutate(
+ df_col = tibble(i = int, d = dbl)
+ ) %>%
+ transmute(
+ int2 = df_col$i,
+ dbl2 = df_col$d
+ ) %>%
+ collect(),
+ example_data
+ )
+})
+
+test_that("nested field ref error handling", {
+ expect_error(
+ example_data %>%
+ arrow_table() %>%
+ mutate(x = int$nested) %>%
+ compute()
+ )
Review Comment:
What is the expected error? (Or did you mean `expect_snapshot_error()`?)
--
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]