You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/05/28 12:35:34 UTC
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #6471: Substrait: Support Expr::ScalarFunction
alamb commented on code in PR #6471:
URL: https://github.com/apache/arrow-datafusion/pull/6471#discussion_r1208535938
##########
datafusion/substrait/src/logical_plan/consumer.rs:
##########
@@ -97,6 +102,27 @@ pub fn name_to_op(name: &str) -> Result<Operator> {
}
}
+fn name_to_scalar_function(name: &str) -> Result<BuiltinScalarFunction> {
+ match name {
Review Comment:
I wonder if you can use `FromStr` for this: https://github.com/apache/arrow-datafusion/blob/2bbc5063fefcc51ca98300e74b1bbc19ef4827ad/datafusion/expr/src/built_in_function.rs#L445-L458
So like
```rust
let func = BuiltinScalarFunction::from_str(name)?;
```
Or perhaps you need a different list of names to match what is in substrait 🤔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org