calcite icon indicating copy to clipboard operation
calcite copied to clipboard

[CALCITE-4632] SARG datatype should be less restictive than any of the input types

Open abhishek-das-gupta opened this issue 3 years ago • 1 comments

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.

abhishek-das-gupta avatar Jul 08 '22 14:07 abhishek-das-gupta

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 avatar Oct 10 '22 02:10 libenchao

@libenchao I agree with your comment. Please let when can resolve this issue, If nothing more needs to be done.

abhishek-das-gupta avatar Oct 13 '22 05:10 abhishek-das-gupta

@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)

libenchao avatar Oct 19 '22 12:10 libenchao