[
https://issues.apache.org/jira/browse/IGNITE-25768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Konstantin Orlov reassigned IGNITE-25768:
-----------------------------------------
Assignee: Konstantin Orlov
> Sql. Invalid search boundaries are generated when accessing the index if the
> key is out of range
> ------------------------------------------------------------------------------------------------
>
> Key: IGNITE-25768
> URL: https://issues.apache.org/jira/browse/IGNITE-25768
> Project: Ignite
> Issue Type: Bug
> Components: sql ai3
> Reporter: Pavel Pereslegin
> Assignee: Konstantin Orlov
> Priority: Major
> Labels: ignite-3
>
> Consider the following:
> {code:sql}
> CREATE TABLE t (id INT PRIMARY KEY, val TINYINT);
> CREATE INDEX t_val_idx ON t (val);
> {code}
> PLAN TableScan vs IndexScan
> {code:sql}
> sql("EXPLAIN SELECT /*+ NO_INDEX */ * FROM t WHERE val = ?", 100500)
> sql("EXPLAIN SELECT /*+ FORCE_INDEX(t_val_idx) */ * FROM t WHERE val = ?",
> 100500)
> {code}
> {noformat}
> TableScan
> table: PUBLIC.T
> predicate: =(CAST(VAL):INTEGER, ?0)
> IndexScan
> table: PUBLIC.T
> index: T_VAL_IDX
> predicate: =(CAST(VAL):INTEGER, ?0)
> searchBounds: [ExactBounds [bound=CAST(?0):TINYINT]]
> {noformat}
> As a result: TableScan returns no rows, but IndexScan fails with:
> {noformat}
> Caused by:
> org.apache.ignite.internal.sql.engine.exec.RemoteFragmentExecutionException:
> IGN-SQL-7 TINYINT out of range TraceId:e329e323
> at
> org.apache.ignite.internal.sql.engine.exec.ExecutionServiceImpl.onMessage(ExecutionServiceImpl.java:575)
> ... 7 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)