Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
lewiszlw committed Mar 27, 2024
1 parent be4df2e commit 80e0e92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/function/split.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
use crate::geo::{GeometryArray, GeometryArrayBuilder};
use crate::DFResult;
use arrow_array::cast::AsArray;
use arrow_array::{BooleanArray, GenericBinaryArray, OffsetSizeTrait};
use arrow_array::{GenericBinaryArray, OffsetSizeTrait};
use arrow_schema::DataType;
use datafusion_common::{internal_datafusion_err, internal_err};
use datafusion_common::{internal_datafusion_err, internal_err, DataFusionError};
use datafusion_expr::{ColumnarValue, ScalarUDFImpl, Signature, Volatility};
use geos::Geom;
use rayon::iter::IntoParallelIterator;
use rayon::prelude::*;
use std::any::Any;
use std::sync::Arc;

Expand Down Expand Up @@ -124,7 +125,7 @@ fn split<O: OffsetSizeTrait, F: OffsetSizeTrait>(
},
)
.collect::<DFResult<Vec<Option<geos::Geometry>>>>()?;
let builder = GeometryArrayBuilder::<O>::from(&geom_vec);
let builder = GeometryArrayBuilder::<O>::from(geom_vec.as_slice());
Ok(ColumnarValue::Array(Arc::new(builder.build())))
}

Expand Down
2 changes: 1 addition & 1 deletion src/geo/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<O: OffsetSizeTrait> From<&[Option<geo::GeometryCollection>]> for GeometryAr
}

#[cfg(feature = "geos")]
impl<O: OffsetSizeTrait> From<&[Option<geos::Geometry>]> for GeometryArrayBuilder<O> {
impl<O: OffsetSizeTrait> From<&[Option<geos::Geometry<'_>>]> for GeometryArrayBuilder<O> {
fn from(value: &[Option<geos::Geometry>]) -> Self {
let mut builder = GeometryArrayBuilder::<O>::new(WkbDialect::Ewkb, value.len());
for geom in value {
Expand Down

0 comments on commit 80e0e92

Please sign in to comment.