Hello, I’m curious about why Filter requires that the condition be a flattened tree? We have some transformations which occasionally result in non-flat trees, which causes issues for us in testing.
I know we can avoid this by constructing expressions using RelBuilder or the RexUtil.composeConjunction, but our transformers work very similar to RexShuttle, which simply clones a RexCall on reconstruction. So there are situations where a subexpression to an `AND` or `OR` expression result in a nested `AND` or `OR` expression. One solution is to use RexUtil.flatten, but that only applies flattening for subexpressions with the same operator, so that expressions like `AND( A, AND( B, C ), OR( E, OR( F, G ) )` only get partially flattened to only gets flattened to `AND( A, B, C, OR( E, OR( F, G) )` which still isn’t flat; the correct flattening would be `AND( A, B, C, OR( E, F, G ) )` Similarly, something like `AND( A, AND( B, C ) ) == …` wouldn’t get flattened at all. Is there a real reason for having this assertion? Would removing it cause problems? Thanks! -Ian J. Bertolacci