[ 
https://issues.apache.org/jira/browse/IGNITE-26587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039877#comment-18039877
 ] 

Konstantin Orlov commented on IGNITE-26587:
-------------------------------------------

We currently don't fully support {{FLOAT}} type. In DDL, it's just an alias to 
{{REAL}}, but on the level of type coercion we lost conversion from {{FLOAT}} 
to {{REAL}}. As as result, there is CAST around column {{f}}, which make it 
impossible to use given literal in search bound (because we casted column, not 
the literal).


> Sql. Scan with condition on float column can't use index. 
> ----------------------------------------------------------
>
>                 Key: IGNITE-26587
>                 URL: https://issues.apache.org/jira/browse/IGNITE-26587
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql ai3
>            Reporter: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>
> Assume, there is a table
> {code:java}
> CREATE TABLE test (id INT PRIMARY KEY, f FLOAT, d DOUBLE){code}
> The next query can use index on float column, when a value passed to the 
> condition as parameter
> {code:java}
> SELECT /*+ FORCE_INDEX(test_f_idx) */ f FROM test WHERE f > ?{code}
> But when the value passed as literal - index can NOT be used.
> {code:java}
> SELECT /*+ FORCE_INDEX(test_f_idx) */ f FROM test WHERE f > 0.0::FLOAT{code}
> Similar queries with using DOUBLE column work as expected in both cases (uses 
> index).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to