Skip to content

Conversation

@nealrichardson
Copy link
Member

Rationale for this change

See #43317 (comment). tidyquery is assembling queries in some way such that when summarize.arrow_dplyr_query() is called, the calling environment isn't a call, so match.call() fails.

What changes are included in this PR?

This PR wraps the match.call() call in a try(). The call is only used to do abandon_ship() on in-memory data anyway. So if the call is not available, it treats it like you're making a query on a Dataset and it tells you to collect() yourself.

Are these changes tested?

I couldn't figure out how to reproduce what was going on inside tidyquery to write a reproducer, and I don't think this is worth adding tidyquery to Suggests for. I confirmed locally that tidyquery tests pass with this change, so our revdeps should be clear.

Are there any user-facing changes?

🙅

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jul 31, 2024
}

# Else, warn, collect(), and run in regular dplyr
call <- get("call", envir = env)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little surprised by this deletion, was this essentially overwritting what was in call when it ran? Or something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved it up to L227

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AAAAAH I totally missed that. Thanks

Copy link
Member

@jonkeane jonkeane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@github-actions github-actions bot added awaiting merge Awaiting merge awaiting changes Awaiting changes and removed awaiting changes Awaiting changes awaiting merge Awaiting merge labels Jul 31, 2024
@jonkeane jonkeane merged commit 0dec116 into apache:main Jul 31, 2024
@jonkeane jonkeane removed the awaiting changes Awaiting changes label Jul 31, 2024
jonkeane pushed a commit that referenced this pull request Jul 31, 2024
### Rationale for this change

See #43317 (comment). `tidyquery` is assembling queries in some way such that when `summarize.arrow_dplyr_query()` is called, the calling environment isn't a call, so `match.call()` fails.

### What changes are included in this PR?

This PR wraps the `match.call()` call in a `try()`. The call is only used to do `abandon_ship()` on in-memory data anyway. So if the call is not available, it treats it like you're making a query on a Dataset and it tells you to `collect()` yourself. 

### Are these changes tested?

I couldn't figure out how to reproduce what was going on inside `tidyquery` to write a reproducer, and I don't think this is worth adding `tidyquery` to Suggests for. I confirmed locally that `tidyquery` tests pass with this change, so our revdeps should be clear.

### Are there any user-facing changes?

🙅 

Authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Signed-off-by: Jonathan Keane <jkeane@gmail.com>
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 0dec116.

There were 3 benchmark results indicating a performance regression:

The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants