Re: Algebraic optimizations rule

2023-06-03 Thread Julian Hyde
, such as addition of an arbitrary expression with zero. > > I will take a look 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 >

RE: Algebraic optimizations rule

2023-06-02 Thread mbudiu
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

Re: Algebraic optimizations rule

2023-06-02 Thread Jiajun Xie
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