Skip to content

Commit

Permalink
fix: use as binary (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadomski authored Jan 2, 2025
1 parent 3526cd8 commit e6dc9e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/duckdb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![warn(unused_crate_dependencies)]

use arrow::{
array::{GenericByteArray, RecordBatch},
array::{AsArray, GenericByteArray, RecordBatch},
datatypes::{GenericBinaryType, SchemaBuilder},
};
use duckdb::{types::Value, Connection};
Expand Down Expand Up @@ -271,7 +271,7 @@ fn to_geoarrow_record_batch(mut record_batch: RecordBatch) -> Result<RecordBatch
if let Some((index, _)) = record_batch.schema().column_with_name("geometry") {
let geometry_column = record_batch.remove_column(index);
let binary_array: GenericByteArray<GenericBinaryType<i32>> =
arrow::array::downcast_array(&geometry_column);
geometry_column.as_binary::<i32>().clone();
let wkb_array = WKBArray::new(binary_array, Default::default());
let geometry_array = geoarrow::io::wkb::from_wkb(
&wkb_array,
Expand Down

0 comments on commit e6dc9e6

Please sign in to comment.