Maksim Zhuravkov created IGNITE-19128:
-----------------------------------------
Summary: Sql. Custom data types. IgniteIndexScan has incorrect
types in searchBounds.
Key: IGNITE-19128
URL: https://issues.apache.org/jira/browse/IGNITE-19128
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 3.0.0-beta2
Reporter: Maksim Zhuravkov
IgniteIndexScanNode has incorrect types in its search bounds although the
filter has correct types in it condition.
Example:
{code:java}
CREATE TABLE t (id PRIMARY KEY, test_key UUID);
CREATE INDEX t_test_key_idx ON t (test_key);
SELECT * FROM t WHERE test_key > '00000000-0000-0001-0000-000000000001'::UUID
AND test_key < '00000000-0000-0001-0000-000000000003'::UUID ORDER BY id
{code}
Error:
{code:java}
Caused by: java.lang.AssertionError: storageType is class java.util.UUID value
must also be class java.util.UUID but it was:
00000000-0000-0001-0000-000000000001
at
org.apache.ignite.internal.sql.engine.util.SafeCustomTypeInternalConversion.tryConvertFromInternal(SafeCustomTypeInternalConversion.java:72)
at
org.apache.ignite.internal.sql.engine.util.TypeUtils.fromInternal(TypeUtils.java:330)
at
org.apache.ignite.internal.sql.engine.exec.RowConverter.toByteBuffer(RowConverter.java:141)
at
org.apache.ignite.internal.sql.engine.exec.RowConverter.toBinaryTuplePrefix(RowConverter.java:85)
at
org.apache.ignite.internal.sql.engine.exec.rel.IndexScanNode.toBinaryTuplePrefix(IndexScanNode.java:208)
at
org.apache.ignite.internal.sql.engine.exec.rel.IndexScanNode.partitionPublisher(IndexScanNode.java:146)
{code}
Plan:
{code:java}
IgniteExchange(distribution=[single]), id = 291
IgniteSort(sort0=[$0], dir0=[ASC]), id = 290
IgniteIndexScan(table=[[PUBLIC, T]], index=[T_TEST_KEY_IDX], type=[SORTED],
searchBounds=[[RangeBounds
[lowerBound=_UTF-8'00000000-0000-0001-0000-000000000001',
upperBound=_UTF-8'00000000-0000-0003-0000-000000000001', lowerInclude=false,
upperInclude=false]]], filters=[AND(>($t1,
CAST(_UTF-8'00000000-0000-0001-0000-000000000001'):UUID NOT NULL), <($t1,
CAST(_UTF-8'00000000-0000-0003-0000-000000000001'):UUID NOT NULL))],
requiredColumns=[{0, 1}], collation=[[1]]), id = 273
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)