To: dev@calcite.apache.org
> Subject: Re: Algebraic optimizations rule
>
> Hello, mbudiu:
>
> Based on my experience, constant folding can occur in two stages.
> - Enable it by `RelBuilder$Config$withSimplify`[1] in the convert stage
> - Add `RelOptRules$CONSTANT_REDUCTION_RULE
at the simplification code to see whether it handles such
cases.
Thank you,
Mihai
-Original Message-
From: Jiajun Xie
Sent: Friday, June 02, 2023 7:08 PM
To: dev@calcite.apache.org
Subject: Re: Algebraic optimizations rule
Hello, mbudiu:
Based on my experience, constant folding can occur in two
Hello, mbudiu:
Based on my experience, constant folding can occur in two stages.
- Enable it by `RelBuilder$Config$withSimplify`[1] in the convert stage
- Add `RelOptRules$CONSTANT_REDUCTION_RULES`[2] in the optimize stage
If your RexNode is not complex, you can directly use RexSimplify. For
Hello,
I was looking for rules that apply algebraic optimizations to RexNode
expressions, such as 0 + x = x, but I couldn't find any.
Is there such a rule?
Mihai