Re: Is there a mechanism for constant folding in Calcite?

2021-10-26 Thread Alessandro Solimando
Hi Ian, regarding commutativity/associativity I think this ML discussion could be relevant and it has some pointers. For what concerns decorrelation, I think that most

Re: Is there a mechanism for constant folding in Calcite?

2021-10-26 Thread Ian Bertolacci
Thanks! I've just tried it out, and it does work for lot of our cases. But I've noticed that it doesn't fold expressions that could be reordered under associativity rules. For example `+( $1, +( 10, 20 ) )` is folded to `+( $1, 30 )`, but the left-deep equivalent `+( +( $1, 10 ), 20 )` is not