Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0F141200D25 for ; Sun, 22 Oct 2017 20:58:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0D9FF160BD7; Sun, 22 Oct 2017 18:58:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 515EE1609E1 for ; Sun, 22 Oct 2017 20:58:09 +0200 (CEST) Received: (qmail 82147 invoked by uid 500); 22 Oct 2017 18:58:08 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 82138 invoked by uid 99); 22 Oct 2017 18:58:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Oct 2017 18:58:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D21FA1A0AF0 for ; Sun, 22 Oct 2017 18:58:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id IY1_OlmOV2kE for ; Sun, 22 Oct 2017 18:58:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 6302F5FB87 for ; Sun, 22 Oct 2017 18:58:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EB290E045B for ; Sun, 22 Oct 2017 18:58:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1133221EE4 for ; Sun, 22 Oct 2017 18:58:02 +0000 (UTC) Date: Sun, 22 Oct 2017 18:58:00 +0000 (UTC) From: "Ildar Absalyamov (JIRA)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ASTERIXDB-1284) Introduce index rewrite does not properly consider type promotion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 22 Oct 2017 18:58:10 -0000 [ https://issues.apache.org/jira/browse/ASTERIXDB-1284?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ildar Absalyamov resolved ASTERIXDB-1284. ----------------------------------------- Resolution: Cannot Reproduce The query returns correct index-based plan in 0.9.3-SNAPSHOT > 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: COMP - Compiler > 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.4.14#64029)