Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Newenv argument torel_from_sql()#1077

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
krlmlr wants to merge2 commits intomain
base:main
Choose a base branch
Loading
fromf-645-rel-env-scan

Conversation

@krlmlr
Copy link
Collaborator

@krlmlrkrlmlr commentedMar 13, 2025
edited
Loading

Closes#645.

@krlmlrkrlmlr changed the titlef 645 rel env scanfeat: Newenv argument torel_from_sql()Mar 13, 2025
@krlmlrkrlmlrenabled auto-merge (squash)March 13, 2025 06:52
@krlmlrkrlmlr marked this pull request as draftMarch 13, 2025 06:52
auto-merge was automatically disabledMarch 13, 2025 06:52

Pull request was converted to draft

@krlmlr
Copy link
CollaboratorAuthor

@hannes: I'd like the code below to work. The issue is thatBind() is called twice, once duringrel_from_sql() (which is fine) and once when accessing the data (how to fix?).

library(duckdb)#> Loading required package: DBIcon<- dbConnect(duckdb(environment_scan=TRUE))create_rel<-function() {df<-data.frame(a=1)duckdb:::rel_from_sql(con,"FROM df")}# This worksrel<- create_rel()rel#> DuckDB Relation:#> ---------------------#> --- Relation Tree ---#> ---------------------#> Subquery#>#> ---------------------#> -- Result Columns  --#> ---------------------#> - a (DOUBLE)# This failsduckdb:::rel_to_altrep(rel)#> Error: Error evaluating duckdb query: Catalog Error: Table with name df does not exist!#> Did you mean "pg_depend"?#>#> LINE 1: SELECT * FROM df#>              ^# Next level: this still works and doesn't crash the sessioninvisible(gc())invisible(gc())invisible(gc())duckdb:::rel_to_altrep(rel)#> Error: Error evaluating duckdb query: Catalog Error: Table with name df does not exist!#> Did you mean "pg_depend"?#>#> LINE 1: SELECT * FROM df#>              ^

Created on 2025-03-13 withreprex v2.1.1

@krlmlr
Copy link
CollaboratorAuthor

Need this PR for the example to work.

@krlmlr
Copy link
CollaboratorAuthor

Proposed solution: on first bind, cache the mapping name -> SEXP somewhere.

Need to check the behavior withdbSendQuery() .

@krlmlrkrlmlrforce-pushed themain branch 2 times, most recently from3e5d5fa tof344576CompareMay 18, 2025 20:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotAwaiting requested review from CopilotCopilot will automatically review once the pull request is marked ready for review

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Provide necessary entry points for environment scan inread_duckdb_sql()

1 participant

@krlmlr

[8]ページ先頭

©2009-2025 Movatter.jp