You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "thisisnic (via GitHub)" <gi...@apache.org> on 2026/09/12 12:33:46 UTC
[PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
thisisnic opened a new pull request, #51313:
URL: https://github.com/apache/arrow/pull/51313
### Rationale for this change
Errors with unnamed columns make it hard to tell why we have the error
### What changes are included in this PR?
Explicitly error with useful message
### Are these changes tested?
Yeah
### Are there any user-facing changes?
Sure
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic merged PR #51313:
URL: https://github.com/apache/arrow/pull/51313
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #51313:
URL: https://github.com/apache/arrow/pull/51313#discussion_r4027278978
##########
r/tests/testthat/test-dplyr-eval.R:
##########
@@ -59,3 +59,28 @@ test_that("try_arrow_dplyr/abandon_ship adds the right message about collect()",
expect_snapshot(tester(ds, i), error = TRUE)
}
})
+
+test_that("dplyr verbs error clearly on empty column names", {
Review Comment:
This test calls `collect()` through `compare_dplyr_binding()` on an Arrow table, so it requires the Acero feature. Unlike the other dplyr test files (for example `r/tests/testthat/test-dplyr-filter.R:21`), this file does not skip when Acero is unavailable, so a no-Acero build will fail this test instead of skipping it. Add `skip_if_not_available("acero")` at the start of the test.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #51313:
URL: https://github.com/apache/arrow/pull/51313#discussion_r3996213030
##########
r/R/dplyr-eval.R:
##########
@@ -252,6 +252,15 @@ abandon_ship <- function(err, env) {
arrow_mask <- function(.data) {
f_env <- new_environment(.cache$functions)
+ # Empty column names can't be bound into an environment (GH-40303).
+ # Like dplyr, refuse to transform such data rather than repairing names.
+ if (!all(nzchar(names(.data$selected_columns)))) {
Review Comment:
`summarise()` calls `arrow_mask()` only after projecting `.data` to the variables referenced by the summary (`r/R/dplyr-summarize.R:46-75`). A table with an empty-name column can therefore bypass this guard whenever that column is unused (for example, `summarise(mean = mean(dbl))`), unlike dplyr and the stated policy. Validate the original query before that projection while keeping `select()`/`rename()` as the escape hatches.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #51313:
URL: https://github.com/apache/arrow/pull/51313#issuecomment-5645910404
:warning: GitHub issue #40303 **has been automatically assigned in GitHub** to PR creator.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40303: [R]: Unnamed columns cause issues when used in dplyr queries [arrow]
Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic commented on code in PR #51313:
URL: https://github.com/apache/arrow/pull/51313#discussion_r3996249031
##########
r/R/dplyr-eval.R:
##########
@@ -252,6 +252,15 @@ abandon_ship <- function(err, env) {
arrow_mask <- function(.data) {
f_env <- new_environment(.cache$functions)
+ # Empty column names can't be bound into an environment (GH-40303).
+ # Like dplyr, refuse to transform such data rather than repairing names.
+ if (!all(nzchar(names(.data$selected_columns)))) {
Review Comment:
It makes no real difference as it's a no-op as that column can't be referenced anyway, no point adding extra code to account for this given the same outcome.
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org