Description
Currently, we have neither an understanding of how type coercion impacts the system, nor decent test coverage. As a result, trying to fix one part causes the other to break (see IGNITE-19128 --> IGNITE-19615 --> IGNITE-19976).
To improve the situation, let us perform the following steps:
- first, it is necessary to cover the current behavior of planner with an exhaustive set of tests:. Here, we need to cover following cases
- coercion for set operations like UNION, INTERSECT and EXCEPT
- coercion for binary comparison and arithmetic
- coercion for IN operator
- coercion for CASE operator
- coercion for function arguments
- coercion of source for INSERT, UPDATE and MERGE operators
- etc (did I miss something?)
- then, we need to cover execution by the similar tests to make sure coercion and execution are aligned
- finally, we should revise coercion rules to remove unnecessary casts
Attachments
Issue Links
- relates to
-
IGNITE-18644 Sql. Type system. Types in predicate expressions may have unnecessary casts.
- Open
-
IGNITE-19882 Sql. Queries that access columns of type DECIMAL do not pick index, when compared with INT/BIGINT.
- Open
-
IGNITE-19931 Sql. Varbinary. Index is not selected for key = '1'::VARBINARY
- Open
-
IGNITE-19128 Sql. Custom data types. IgniteIndexScan has incorrect types in searchBounds.
- Resolved
-
IGNITE-19615 Index is not used while performing SELECT over an indexed column
- Resolved
-
IGNITE-19976 Sql: ClassCastException when trying to select from indexed smallint column
- Resolved
-
IGNITE-22698 Sql. Extend test coverage for numeric comparison with literal wider than numeric type
- Resolved
-
IGNITE-19999 Sql. Add planner test to verify numeric type coercion in binary comparison
- Resolved
-
IGNITE-20000 Sql. Add planner test to verify numeric type coercion in binary arithmetic
- Resolved
-
IGNITE-22462 Sql. Add planner test to verify type coercion for set operations like UNION, INTERSECT and EXCEPT
- Resolved
-
IGNITE-22579 Sql. Add planner test to verify numeric type coercion for IN operator
- Resolved
-
IGNITE-22580 Sql. Add planner test to verify numeric type coercion for CASE operator
- Resolved
-
IGNITE-22581 Sql. Add planner test to verify numeric type coercion of source for INSERT, UPDATE and MERGE operators
- Resolved
-
IGNITE-23041 Sql. Add planner test to verify numeric type coercion for function arguments
- Resolved
-
IGNITE-23141 Sql. Add execution test to verify numeric type coercion in binary comparison and arithmetic
- Resolved
-
IGNITE-23336 Append additional planner tests for arithmetic results type coercion
- Resolved