Skip to content

Commit

Permalink
chore: datafusion 44 prototype change on make_array
Browse files Browse the repository at this point in the history
Signed-off-by: R. Tyler Croy <[email protected]>
  • Loading branch information
rtyler committed Jan 1, 2025
1 parent e12eb75 commit 6056bf6
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crates/core/src/delta_datafusion/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,13 @@ impl ScalarUDFImpl for MakeParquetArray {
r_type
}

fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue> {
fn invoke_batch(&self, args: &[ColumnarValue], number_rows: usize) -> Result<ColumnarValue> {
let mut data_type = DataType::Null;
for arg in args {
data_type = arg.data_type();
}

#[allow(deprecated)]
match self.actual.invoke(args)? {
match self.actual.invoke_batch(args, number_rows)? {
ColumnarValue::Scalar(ScalarValue::List(df_array)) => {
let field = Arc::new(Field::new("element", data_type, true));
let result = Ok(ColumnarValue::Scalar(ScalarValue::List(Arc::new(
Expand All @@ -127,10 +126,6 @@ impl ScalarUDFImpl for MakeParquetArray {
}
}

fn invoke_no_args(&self, number_rows: usize) -> Result<ColumnarValue> {
self.actual.invoke_batch(&[], number_rows)
}

fn aliases(&self) -> &[String] {
&self.aliases
}
Expand Down

0 comments on commit 6056bf6

Please sign in to comment.