Thank you very much for your reply. I have learned a lot!

Hongyu

On Fri, Jan 5, 2024 at 12:55 AM Mihai Budiu <mbu...@gmail.com> wrote:

>
> https://calcite.apache.org/javadocAggregate/org/apache/calcite/rel/rules/ReduceExpressionsRule.ProjectReduceExpressionsRule.html
>
> Calcite has a very powerful constant folding optimizer.
>
> Mihai
> ________________________________
> From: Hongyu Guo <guohongyu...@gmail.com>
> Sent: Thursday, January 4, 2024 4:16:31 AM
> To: dev@calcite.apache.org <dev@calcite.apache.org>
> Subject: Simplify function with constant parameters
>
> Hi devs,
>
> Function with constant parameters can be simplified, for example
> ```
> select abs(-1) as a, sqrt(4) as b;
> can be simplified as
> select 1 as a, 2.0 as b;
> ```
> The execution of the function occurs during planning rather than during
> runtime.
> I noticed that Spark supports this simplification. Can Calcite also support
> it? I can log a new jira if you agree.
>
> Best,
> Hongyu
>

Reply via email to