Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F337019FBF for ; Sun, 20 Mar 2016 01:05:37 +0000 (UTC) Received: (qmail 76727 invoked by uid 500); 20 Mar 2016 01:05:37 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 76690 invoked by uid 500); 20 Mar 2016 01:05:37 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 76681 invoked by uid 99); 20 Mar 2016 01:05:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2016 01:05:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4F2EB1804FB for ; Sun, 20 Mar 2016 01:05:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id rsn0hpca3TX9 for ; Sun, 20 Mar 2016 01:05:35 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id E103A5F24B for ; Sun, 20 Mar 2016 01:05:34 +0000 (UTC) Received: (qmail 75029 invoked by uid 99); 20 Mar 2016 01:05:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Mar 2016 01:05:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8A4A42C14FB for ; Sun, 20 Mar 2016 01:05:33 +0000 (UTC) Date: Sun, 20 Mar 2016 01:05:33 +0000 (UTC) From: "Wenhai (JIRA)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ASTERIXDB-1354) Foreign key select error of UNION MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ASTERIXDB-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wenhai updated ASTERIXDB-1354: ------------------------------ Description: If we set up a composite primary key (i.e. LineItem(l_orderkey, l_linenumber) referring to anohter table (i.e. Orders(o_orderkey), the same selection condition will introduce a readCount error. Schemas {noformat} use dataverse tpch; create type LineItemType as closed { l_orderkey: int32, l_partkey: int32, l_suppkey: int32, l_linenumber: int32, l_quantity: int32, l_extendedprice: double, l_discount: double, l_tax: double, l_returnflag: string, l_linestatus: string, l_shipdate: string, l_commitdate: string, l_receiptdate: string, l_shipinstruct: string, l_shipmode: string, l_comment: string } create type OrderType as closed { 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 LineItem(LineItemType) primary key l_orderkey, l_linenumber; create dataset Orders(OrderType) primary key o_orderkey; use dataverse tpch; load dataset LineItem using localfs (("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")); load dataset Orders using localfs (("path"="asterix_nc2://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")); {noformat} Query: {noformat} use dataverse tpch; let $l := for $r in dataset LineItem where $r.l_orderkey = 2 return $r.l_linenumber let $o := for $s in dataset Orders where $s.o_orderkey =2 return $s.o_custkey let $c := $l union $o return $c {noformat} Error: {noformat} Invalid LSM disk component readerCount: -1 [IllegalStateException] {noformat} was: If we set up a composite primary key (i.e. LineItem(l_orderkey, l_linenumber) referring to anohter table (i.e. Orders(o_orderkey), the same selection condition will introduce a readCount error. Schemas {noformat} use dataverse tpch; create type LineItemType as closed { l_orderkey: int32, l_partkey: int32, l_suppkey: int32, l_linenumber: int32, l_quantity: int32, l_extendedprice: double, l_discount: double, l_tax: double, l_returnflag: string, l_linestatus: string, l_shipdate: string, l_commitdate: string, l_receiptdate: string, l_shipinstruct: string, l_shipmode: string, l_comment: string } create type OrderType as closed { 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 } use dataverse tpch; load dataset LineItem using localfs (("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")); load dataset Orders using localfs (("path"="asterix_nc2://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")); {noformat} Query: {noformat} use dataverse tpch; let $l := for $r in dataset LineItem where $r.l_orderkey = 2 return $r.l_linenumber let $o := for $s in dataset Orders where $s.o_orderkey =2 return $s.o_custkey let $c := $l union $o return $c {noformat} Error: {noformat} Invalid LSM disk component readerCount: -1 [IllegalStateException] {noformat} > Foreign key select error of UNION > --------------------------------- > > Key: ASTERIXDB-1354 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1354 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB > Environment: General Environment. > Reporter: Wenhai > Labels: patch > > If we set up a composite primary key (i.e. LineItem(l_orderkey, l_linenumber) referring to anohter table (i.e. Orders(o_orderkey), the same selection condition will introduce a readCount error. > Schemas > {noformat} > use dataverse tpch; > create type LineItemType as closed { > l_orderkey: int32, > l_partkey: int32, > l_suppkey: int32, > l_linenumber: int32, > l_quantity: int32, > l_extendedprice: double, > l_discount: double, > l_tax: double, > l_returnflag: string, > l_linestatus: string, > l_shipdate: string, > l_commitdate: string, > l_receiptdate: string, > l_shipinstruct: string, > l_shipmode: string, > l_comment: string > } > create type OrderType as closed { > 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 LineItem(LineItemType) primary key l_orderkey, l_linenumber; > create dataset Orders(OrderType) primary key o_orderkey; > use dataverse tpch; > load dataset LineItem > using localfs > (("path"="asterix_nc1://data/tpch0.001/lineitem.tbl"),("format"="delimited-text"),("delimiter"="|")); > load dataset Orders > using localfs > (("path"="asterix_nc2://data/tpch0.001/orders.tbl"),("format"="delimited-text"),("delimiter"="|")); > {noformat} > Query: > {noformat} > use dataverse tpch; > let $l := for $r in dataset LineItem where $r.l_orderkey = 2 > return $r.l_linenumber > let $o := for $s in dataset Orders where $s.o_orderkey =2 > return $s.o_custkey > let $c := $l union $o > return $c > {noformat} > Error: > {noformat} > Invalid LSM disk component readerCount: -1 [IllegalStateException] > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)