Skip to content

Commit 2c587c5

Browse files
committed
fix: Don't nullify release callback for schemas
1 parent 417659d commit 2c587c5

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

src/main/capi/arrow-c.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,6 @@ void EmptyStreamRelease(ArrowArrayStream *stream) {
203203

204204
void FactoryGetSchema(ArrowArrayStream *stream, ArrowSchema &schema) {
205205
stream->get_schema(stream, &schema);
206-
207-
// Need to nullify the root schema's release function here, because streams don't allow us to set the release
208-
// function. For the schema's children, we nullify the release functions in `duckdb_arrow_scan`, so we don't need to
209-
// handle them again here. We set this to nullptr and not EmptySchemaRelease to prevent ArrowSchemaWrapper's
210-
// destructor from destroying the schema (it's the caller's responsibility).
211-
schema.release = nullptr;
212206
}
213207

214208
int GetSchema(struct ArrowArrayStream *stream, struct ArrowSchema *out) {
@@ -218,7 +212,6 @@ int GetSchema(struct ArrowArrayStream *stream, struct ArrowSchema *out) {
218212
}
219213

220214
*out = *private_data->schema;
221-
out->release = EmptySchemaRelease;
222215
return DuckDBSuccess;
223216
}
224217

0 commit comments

Comments
 (0)