You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till (JIRA)" <ji...@apache.org> on 2016/08/17 20:41:21 UTC

[jira] [Updated] (ASTERIXDB-1284) Introduce index rewrite does not properly consider type promotion

     [ https://issues.apache.org/jira/browse/ASTERIXDB-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Till updated ASTERIXDB-1284:
----------------------------
    Component/s: Optimizer

> Introduce index rewrite does not properly consider type promotion
> -----------------------------------------------------------------
>
>                 Key: ASTERIXDB-1284
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1284
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Optimizer
>            Reporter: Ildar Absalyamov
>            Assignee: Ildar Absalyamov
>            Priority: Minor
>              Labels: soon
>
> The following query returns "Can't cast a value: 4.294967296E9 from INT64 type to INT32 type because of the out-of-range error. [AlgebricksException]"  error, while trying to apply index rewrite. The correct solution would be to prune the index and fall back to data scan, since the int64 predicate value is not demotable to int32.
> {noformat}
> drop dataverse tpch if exists;
> create dataverse tpch;
> use dataverse tpch;
> create type OrderType as open {
>   o_orderkey: int32,
>   o_custkey: int32,
>   o_orderstatus: string,
>   o_totalprice: double,
>   o_orderdate: string,
>   o_orderpriority: string,
>   o_clerk: string,
>   o_shippriority: int32,
>   o_comment: string
> }
> create dataset Orders(OrderType) primary key o_orderkey;
> for $o in dataset('Orders')
> where $o.o_orderkey <=int64("4294967296")
> order by $o.o_orderkey
> return $o
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)