From notifications-return-155290-archive-asf-public=cust-asf.ponee.io@asterixdb.apache.org Sat Jun 13 08:03:06 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4E80C18064C for ; Sat, 13 Jun 2020 10:03:06 +0200 (CEST) Received: (qmail 33216 invoked by uid 500); 13 Jun 2020 08:03:05 -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 33205 invoked by uid 99); 13 Jun 2020 08:03:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jun 2020 08:03:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id BCD9DC1236 for ; Sat, 13 Jun 2020 08:03:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -112.99 X-Spam-Level: X-Spam-Status: No, score=-112.99 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_DMARC_STATUS=0.01, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id Oc5ptrtyPGgn for ; Sat, 13 Jun 2020 08:03:03 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=207.244.88.153; helo=mail.apache.org; envelope-from=jira@apache.org; receiver= Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with SMTP id B25E5BB802 for ; Sat, 13 Jun 2020 08:03:02 +0000 (UTC) Received: (qmail 33144 invoked by uid 99); 13 Jun 2020 08:03:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 13 Jun 2020 08:03:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C771F40090 for ; Sat, 13 Jun 2020 08:03:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 555EB7808B2 for ; Sat, 13 Jun 2020 08:03:00 +0000 (UTC) Date: Sat, 13 Jun 2020 08:03:00 +0000 (UTC) From: "Glenn Galvizo (Jira)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ASTERIXDB-2745) Different join query results for typed and untyped datasets MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ASTERIXDB-2745?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Glenn Galvizo updated ASTERIXDB-2745: ------------------------------------- Attachment: exists-typed-bug.tar.gz > Different join query results for typed and untyped datasets > ----------------------------------------------------------- > > Key: ASTERIXDB-2745 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-2745 > Project: Apache AsterixDB > Issue Type: Bug > Affects Versions: 0.9.4.1 > Reporter: Glenn Galvizo > Priority: Major > Attachments: exists-typed-bug.tar.gz > > > Performing the query below, on a typed dataset: > {code:sql} > =C2=A0SELECT U.name.first as first_name, S.categories > =C2=A0FROM UserTyped U, StoresTyped S > =C2=A0WHERE U.is_shopper AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 U.capacity =3D 3 AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 "Beverages" IN S.categories AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 EXISTS ( > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 SELECT * > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 FROM WorkForTyped W > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 WHERE S.store_id =3D W.store_id AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 W.shopper_id =3D U= .user_id AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 S.name =3D "Sheetz= " > =C2=A0=C2=A0 =C2=A0 =C2=A0 ); > {code} > incorrectly returns less results than the same query on a non-typed datas= et: > {code:sql} > =C2=A0SELECT U.name.first as first_name, S.categories > =C2=A0FROM UserNotTyped U, StoresNotTyped S > =C2=A0WHERE U.is_shopper AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 U.capacity =3D 3 AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 "Beverages" IN S.categories AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 EXISTS ( > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 SELECT * > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 FROM WorkForNotTyped W > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 WHERE S.store_id =3D W.store_id AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 W.shopper_id =3D U= .user_id AND > =C2=A0=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 S.name =3D "Sheetz= " > =C2=A0=C2=A0 =C2=A0 =C2=A0 ); > {code} > Additionally, it was found that moving the 'S.name =3D "Sheetz"' term out= of the EXISTS clause and into the outer-level WHERE clause changes the out= put of the typed-query to be correct. -- This message was sent by Atlassian Jira (v8.3.4#803005)