paleolimbot commented on code in PR #214:
URL: https://github.com/apache/sedona-db/pull/214#discussion_r2425103092
##########
r/sedonadb/src/rust/src/dataframe.rs:
##########
@@ -83,12 +85,22 @@ impl InternalDataFrame {
Ok(())
}
- fn to_arrow_stream(&self, out: savvy::Sexp) -> Result<()> {
+ fn to_arrow_stream(&self, out: savvy::Sexp, requested_schema_xptr:
savvy::Sexp) -> Result<()> {
let out_void = unsafe { savvy_ffi::R_ExternalPtrAddr(out.0) };
if out_void.is_null() {
return Err(savvy_err!("external pointer to null in
to_arrow_stream()"));
}
+ let maybe_requested_schema = if requested_schema_xptr.is_null() {
+ None
+ } else {
+ Some(import_schema(requested_schema_xptr))
+ };
+
+ if maybe_requested_schema.is_some() {
Review Comment:
This is a good point, but I'm trying to take care of as much FFI wiring here
so that the next person (maybe me) doesn't have to
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]