From notifications-return-158550-archive-asf-public=cust-asf.ponee.io@asterixdb.apache.org Wed Jun 30 01:25:04 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 941F018064E for ; Wed, 30 Jun 2021 03:25:04 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id BEE7C3EE40 for ; Wed, 30 Jun 2021 01:25:03 +0000 (UTC) Received: (qmail 62191 invoked by uid 500); 30 Jun 2021 01:25:03 -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 62179 invoked by uid 99); 30 Jun 2021 01:25:03 -0000 Received: from spamproc1-he-de.apache.org (HELO spamproc1-he-de.apache.org) (116.203.196.100) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2021 01:25:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamproc1-he-de.apache.org (ASF Mail Server at spamproc1-he-de.apache.org) with ESMTP id C049A1FF48C for ; Wed, 30 Jun 2021 01:25:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamproc1-he-de.apache.org X-Spam-Flag: NO X-Spam-Score: -110.509 X-Spam-Level: X-Spam-Status: No, score=-110.509 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_HOSTKARMA_W=-2.5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WELCOMELIST=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-he-de.apache.org ([116.203.227.195]) by localhost (spamproc1-he-de.apache.org [116.203.196.100]) (amavisd-new, port 10024) with ESMTP id 2Swewz7CJrlq for ; Wed, 30 Jun 2021 01:25:02 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=3.227.148.255; helo=mxout1-ec2-va.apache.org; envelope-from=jira@apache.org; receiver= Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by mx1-he-de.apache.org (ASF Mail Server at mx1-he-de.apache.org) with ESMTPS id 5712F7FE7E for ; Wed, 30 Jun 2021 01:25:02 +0000 (UTC) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id 564713ED99 for ; Wed, 30 Jun 2021 01:25:01 +0000 (UTC) Received: (qmail 61893 invoked by uid 99); 30 Jun 2021 01:25:01 -0000 Received: from mailrelay1-he-de.apache.org (HELO mailrelay1-he-de.apache.org) (116.203.21.61) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jun 2021 01:25:01 +0000 Received: from jira2-he-de.apache.org (jira2-he-de.apache.org [168.119.33.54]) by mailrelay1-he-de.apache.org (ASF Mail Server at mailrelay1-he-de.apache.org) with ESMTPS id 76F7A3E9BD for ; Wed, 30 Jun 2021 01:25:00 +0000 (UTC) Received: from jira2-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira2-he-de.apache.org (ASF Mail Server at jira2-he-de.apache.org) with ESMTP id 428B5C80A88 for ; Wed, 30 Jun 2021 01:25:00 +0000 (UTC) Date: Wed, 30 Jun 2021 01:25:00 +0000 (UTC) From: "Dmitry Lychagin (Jira)" To: notifications@asterixdb.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (ASTERIXDB-2917) Incorrect result with group by and cross product 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-2917?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmitry Lychagin resolved ASTERIXDB-2917. ---------------------------------------- Resolution: Fixed > Incorrect result with group by and cross product > ------------------------------------------------ > > Key: ASTERIXDB-2917 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-2917 > Project: Apache AsterixDB > Issue Type: Bug > Components: COMP - Compiler > Reporter: Dmitry Lychagin > Assignee: Dmitry Lychagin > Priority: Major > Fix For: 0.9.7 > > > The following query returns incorrect result:=C2=A0 > {noformat} > create dataset t1(id integer not unknown) open type primary key id; > create dataset t2(id integer not unknown) open type primary key id; > insert into t1 ([ > { "id": 1, "x": "a" }, > { "id": 2, "x": "a" }, > { "id": 3, "x": "a" }, > { "id": 4, "x": "b" }, > { "id": 5, "x": "b" }, > { "id": 6, "x": "b" } > ]); > insert into t2 ([ > { "id": 11, "y": "c" }, > { "id": 12, "y": "c" } > ]); > select t1.x, count(*) as cnt > from t2, t1 > group by t1.x > order by t1.x; > {noformat} > Expected result: > {noformat} > { "cnt": 6, "x": "a" } > { "cnt": 6, "x": "b" } > {noformat} > Actual (incorrect) result > {noformat} > { "cnt": 3, "x": "a" } > { "cnt": 3, "x": "a" } > { "cnt": 3, "x": "b" } > { "cnt": 3, "x": "b" } > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)