Shuo Cheng created FLINK-16577: ---------------------------------- Summary: Exception will be thrown when computing columnInterval relmetadata in some case Key: FLINK-16577 URL: https://issues.apache.org/jira/browse/FLINK-16577 Project: Flink Issue Type: Bug Components: Table SQL / Planner Affects Versions: 1.10.0 Reporter: Shuo Cheng Fix For: 1.11.0 Attachments: image-2020-03-13-10-32-35-375.png
Consider the following SQL {code:java} // a: INT, c: LONG SELECT c, SUM(a) FROM T WHERE a > 0.1 AND a < 1 GROUP BY c{code} Here the sql type of 0.1 is Decimal and 1 is Integer, and they are both in NUMERIC type family, and do not trigger type coercion, so the plan is: {code:java} FlinkLogicalAggregate(group=[{0}], EXPR$1=[SUM($1)]) +- FlinkLogicalCalc(select=[c, a], where=[AND(>(a, 0.1:DECIMAL(2, 1)), <(a, 1))]) +- FlinkLogicalTableSourceScan(table=[[...]], fields=[a, b, c]) {code} When we calculate the filtered column interval of calc, it'll lead to validation exception of `FiniteValueInterval`: !image-2020-03-13-10-32-35-375.png! -- This message was sent by Atlassian Jira (v8.3.4#803005)