-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaner API to create Expr::ScalarFunction
programatically
#1718
Comments
What about something like:
|
That would have the upside that the compiler could check the name It has the downside that the user has to know the mapping from the sql level name (e.g. Perhaps we could do both 🤔 |
I'd like to have a try if no one has been doing it😀 |
@HaoYang670 thanks |
I find some duplicate tests in |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I am trying to programatically create
Expr
s that represent function calls, for exampleto_timetsamp(x, 4)
or somethingTo do so today you have to do something like this (from simplify_expressions.rs) which is 🤮
Describe the solution you'd like
I would like to write code like this
Note you can lookup a
str
to scalar function by name with something like:Additional context
There are a bunch of this nonsense in
simplify_expression.rs
which could be cleaned upThe text was updated successfully, but these errors were encountered: