apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
6.27k stars 1.18k forks source link

[Help] - Using unary operators with multiple inputs #880

Open praveentiru opened 3 years ago

praveentiru commented 3 years ago

I prefer to use Dataframe API directly and I am trying to do the same. I am new to library so, I am unable to figure out how to use certain functions in logical_plan that are declared as unary operators but actually need multiple inputs.

Examples:

Common signature in all 3 cases is: pub fn function_name(e: Expr) -> Expr

Question: How does proper input expression for this to work?

praveentiru commented 3 years ago

It seems that this is lack of proper implementation for certain functions. After upgrading the dependency from "4.0" to "5.0" the signature of concat has changed from pub fn concat(e: Expr) -> Expr to pub fn concat(args: &[Expr]) -> Expr.

It would be helpful to new users to documents functions that are yet to be properly implemented. I will try to create a list but, need someone to validate this properly.