Hello,

Today I bumped into a case where digest normalization is not desirable and
brings problems to a downstream project.

To be more specific, Hive has a rule to reorder operators in a filter
condition for performance reasons [1] which becomes useless after
normalization.

The good news is that normalization can be disabled by a system property
[2] but tweaking system properties becomes a bit cumbersome in big
projects.

What do you think about making the normalizer (RexNormalize) more modular
and independent from RexCall?
If downstream projects want to use the normalizer they could pass it in the
planner (e.g., similar to how RexExecutor is plugged in).

Best,
Stamatis

[1]
https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveFilterSortPredicates.java
[2]
https://github.com/apache/calcite/blob/b49693d31964657bf5058bd9387e505992cebd51/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java#L104

On Thu, Jul 16, 2020 at 10:52 AM Danny Chan <yuzhao....@gmail.com> wrote:

> I added and it passed.
>
> Best,
> Danny Chan
> 在 2020年7月16日 +0800 PM4:35,Vladimir Sitnikov <sitnikov.vladi...@gmail.com
> >,写道:
> > Danny, could you please add a test case for nestes normalization (see
> > comment in pr) ?
> >
> > Vladimir
>

Reply via email to