calcite
calcite copied to clipboard
[CALCITE-4632] SARG datatype should be less restictive than any of the input types
Instead of first row expression's datatype, SARG datatype should consider datatype
of every row expression present in the IN clause and should return the most general of a
set of datatypes.
I found that there is a similar work before: CALCITE-4888.
@beyond1920 What do you think about this? I think we can add you as a co-author of this issue since you already have a similar PR(https://github.com/apache/calcite/pull/2612), and resolve both CALCITE-4888 and CALCITE-4632 together.
@libenchao I agree with your comment. Please let when can resolve this issue, If nothing more needs to be done.
@abhishek-das-gupta I found that RexBuilder#makeBetween also may have the same problem, could you help to confirm this, and fix it if it exists? (In this issue, or a follow-up issue, it's up to you, I'm ok with both way)