Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F093F18E13 for ; Wed, 20 Jan 2016 18:05:39 +0000 (UTC) Received: (qmail 6638 invoked by uid 500); 20 Jan 2016 18:05:39 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 6608 invoked by uid 500); 20 Jan 2016 18:05:39 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 6597 invoked by uid 99); 20 Jan 2016 18:05:39 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jan 2016 18:05:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C21BA2C0453 for ; Wed, 20 Jan 2016 18:05:39 +0000 (UTC) Date: Wed, 20 Jan 2016 18:05:39 +0000 (UTC) From: "Victoria Markman (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4289) window functions give different results if star is used in inner query 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/DRILL-4289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Victoria Markman updated DRILL-4289: ------------------------------------ Labels: window_funcion (was: ) > window functions give different results if star is used in inner query > ---------------------------------------------------------------------- > > Key: DRILL-4289 > URL: https://issues.apache.org/jira/browse/DRILL-4289 > Project: Apache Drill > Issue Type: Bug > Components: Query Planning & Optimization > Affects Versions: 1.5.0 > Reporter: Deneche A. Hakim > Labels: window_funcion > Attachments: b1p1tbl.json > > > The following queries give different results, although they are similar: > {noformat} > SELECT position_id, COUNT(*) OVER w AS `count` FROM (SELECT position_id FROM `/b1p2tbl` ORDER BY employee_id, sub) WINDOW w AS (PARTITION BY position_id); > +--------------+--------+ > | position_id | count | > +--------------+--------+ > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 1 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > | 2 | 10 | > +--------------+--------+ > {noformat} > {noformat} > SELECT position_id, COUNT(*) OVER w AS `count` FROM (SELECT * FROM dfs.data.`b1p2tbl` ORDER BY employee_id, sub) WINDOW w AS (PARTITION BY position_id); > +--------------+--------+ > | position_id | count | > +--------------+--------+ > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 1 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > | 2 | 20 | > +--------------+--------+ > {noformat} > the results of the second query are incorrect. -- This message was sent by Atlassian JIRA (v6.3.4#6332)