Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and improve $scan/read_parquet() #492

Merged
merged 12 commits into from
Nov 15, 2023
Merged

Refactor and improve $scan/read_parquet() #492

merged 12 commits into from
Nov 15, 2023

Conversation

sorhawell
Copy link
Collaborator

No description provided.

R/parquet.R Outdated Show resolved Hide resolved
@sorhawell
Copy link
Collaborator Author

sorhawell commented Nov 12, 2023

@eitsupi sorry for circling around the match.call eval.

I noticed in new utest "scan read parquet from other process" that replacement of eval.parent with eval will not work. But using eval.parent makes the frame stack a bit strange, and parent frame could very well be ´R_GlobalEnv´. Maybe that could give some unexpected behavior one day.

How about do.call(f, args)?

pl$read_parquet(x,y,z) { 
  args = as.list(environment())
    result({
      do.call(pl$scan_parquet, args)$collect()
    }) |>
      unwrap("in pl$read_parquet(): ")
  }

@etiennebacher
Copy link
Collaborator

How about do.call(f, args)?

This looks more robust indeed

@eitsupi
Copy link
Collaborator

eitsupi commented Nov 13, 2023

How about do.call(f, args)?

Actually I am not familiar with these but they seem to work well, thanks!

@sorhawell sorhawell marked this pull request as ready for review November 15, 2023 01:33
sorhawell and others added 2 commits November 15, 2023 02:37
Merge remote-tracking branch 'origin/parquet_err' into parquet_err

# Conflicts:
#	R/parquet.R
#	tests/testthat/test-parquet.R
@etiennebacher
Copy link
Collaborator

Thanks! I'll just tweak a few things before merging

@etiennebacher etiennebacher changed the title refactor scan/read_parquet + support more args Refactor and improve $scan/read_parquet() Nov 15, 2023
@etiennebacher etiennebacher merged commit d16d528 into main Nov 15, 2023
2 checks passed
@etiennebacher etiennebacher deleted the parquet_err branch November 15, 2023 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants