Skip to content

Commit

Permalink
update to datafusion 40.0
Browse files Browse the repository at this point in the history
  • Loading branch information
milenkovicm committed Jul 30, 2024
1 parent 8a28946 commit 5c92df6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Basic Flow

on:
push:
branches: [master]
branches: [master, ci_*]
paths-ignore:
- "**.md"
- "**.yaml"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ license = "MIT"

[dependencies]
tokio = { version = "^1.36", features = ["rt-multi-thread"]}
datafusion = { version = "38.0" }
datafusion = { version = "40.0" }
# datafusion = { git = "https://github.com/apache/arrow-datafusion.git", rev="799be5e76bd631608b2357dbbe600afc2cebc359" }
thiserror = { version = "1.0"}
log = { version = "0.4" }
Expand Down
6 changes: 1 addition & 5 deletions src/argmax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use datafusion::{
},
common::{downcast_value, internal_err},
error::{DataFusionError, Result},
logical_expr::{ColumnarValue, FuncMonotonicity, ScalarUDFImpl, Signature, Volatility},
logical_expr::{ColumnarValue, ScalarUDFImpl, Signature, Volatility},
};
use std::{any::Any, fmt::Debug, sync::Arc};

Expand Down Expand Up @@ -96,10 +96,6 @@ impl ScalarUDFImpl for ArgMax {
fn aliases(&self) -> &[String] {
&[]
}

fn monotonicity(&self) -> Result<Option<FuncMonotonicity>> {
Ok(None)
}
}

impl ArgMax {
Expand Down
9 changes: 5 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use datafusion::{
context::{FunctionFactory, RegisterFunction, SessionContext, SessionState},
runtime_env::{RuntimeConfig, RuntimeEnv},
},
logical_expr::{CreateFunction, DefinitionStatement, ScalarUDF},
logical_expr::{CreateFunction, ScalarUDF},
scalar::ScalarValue,
};
use log::debug;

Expand Down Expand Up @@ -46,9 +47,9 @@ impl FunctionFactory for TorchFunctionFactory {
.map(|t| find_item_type(&t))
.unwrap_or(data_type_input.clone());

let model_file = match statement.params.as_ {
Some(DefinitionStatement::DoubleDollarDef(s)) => s,
Some(DefinitionStatement::SingleQuotedDef(s)) => s,
let model_file = match statement.params.function_body {
Some(datafusion::prelude::Expr::Literal(ScalarValue::Utf8(Some(s)))) => s,
// we should at least print a warning
_ => format!("model/{}.spt", model_name),
};
let config = state
Expand Down

0 comments on commit 5c92df6

Please sign in to comment.