Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.26.0
Description
Query may return wrong result when fixed-length strings (CHAR(N)) are used in OR/IN clause
@Test void test() { // Passed. CalciteAssert.that() .query("select * from (values (1, 'a'), (2, 'abc')) where EXPR$1 = 'a'") .returns("EXPR$0=1; EXPR$1=a \n"); // Failed. Only "EXPR$0=2; EXPR$1=abc\n" is returned CalciteAssert.that() .query("select * from (values (1, 'a'), (2, 'abc')) where EXPR$1 = 'a' or EXPR$1 = 'abc'") .returns("EXPR$0=1; EXPR$1=a \n" + "EXPR$0=2; EXPR$1=abc\n"); }
Attachments
Issue Links
- is duplicated by
-
CALCITE-4647 INTERSECT returns wrong results
-
- Closed
-
-
CALCITE-4648 Except returns wrong results
-
- Closed
-
- is related to
-
CALCITE-4903 Avatica pads values returned from values-clause to same length
-
- Open
-
-
CALCITE-4667 INNER join returns empty set
-
- Open
-
-
CALCITE-4710 In the special scenario of the case when statement, the constant RexNode fails to be parsed.
-
- Open
-
-
CALCITE-762 Trailing spaces on character literals
-
- Closed
-
-
CALCITE-1199 Incorrect trimming of CHAR when performing cast to VARCHAR
-
- Closed
-
-
CALCITE-2311 case when returns redundant white space
-
- Closed
-
-
CALCITE-4888 The type of generated search argument literal is wrong if the literal types of RelBuilder.in are different and compatible
-
- Closed
-
-
CALCITE-2321 The type of a union of CHAR columns of different lengths should be VARCHAR (based on a conformance setting)
-
- Closed
-
- relates to
-
CALCITE-4493 Postgres/Mysql String Literal Equality Creates incorrect results.
-
- Open
-
- links to