-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: data frame with lazy relation AltrepDataFrameRelation
#960
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect the test output to be unchanged? Please also add rel_filter2()
.
src/relational.cpp
Outdated
projections.push_back(std::move(dexpr)); | ||
} | ||
|
||
duckdb::rel_extptr_t rel = cpp11::as_cpp<cpp11::decay_t<duckdb::rel_extptr_t>>(rapi_rel_from_df(con, df, false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rapi_()
functions are external, this coupling is a bit too tight. Perhaps extract an internal function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just temporarily
@@ -162,6 +162,28 @@ using namespace cpp11; | |||
return make_external_prot<RelationWrapper>("duckdb_relation", prot, res); | |||
} | |||
|
|||
[[cpp11::register]] SEXP rapi_rel_filter2(data_frame df, duckdb::conn_eptr_t con, list exprs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move these to a separate .cpp
file and keep them in the same order as here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still valid. Can you please follow up?
I like the idea of |
} | ||
|
||
const vector<ColumnDefinition> &AltrepDataFrameRelation::Columns() { | ||
return columns; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? Can this still be parent->...()
?
} | ||
duckdb::rel_extptr_t rel = cpp11::as_cpp<cpp11::decay_t<duckdb::rel_extptr_t>>(rapi_rel_from_any_df(con, df, true)); | ||
|
||
auto filter = make_shared_ptr<FilterRelation>(rel->rel, std::move(filter_expr)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be wrapped in an ALTREP data frame at this stage.
Closes #949