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 90DE8200B5D for ; Sat, 23 Jul 2016 21:31:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8F803160A68; Sat, 23 Jul 2016 19:31:22 +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 13502160A8B for ; Sat, 23 Jul 2016 21:31:21 +0200 (CEST) Received: (qmail 10160 invoked by uid 500); 23 Jul 2016 19:31:20 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 10011 invoked by uid 99); 23 Jul 2016 19:31:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Jul 2016 19:31:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7E1802C0D60 for ; Sat, 23 Jul 2016 19:31:20 +0000 (UTC) Date: Sat, 23 Jul 2016 19:31:20 +0000 (UTC) From: "Khurram Faraaz (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (DRILL-4803) NULLS are not first when NULLS FIRST is used with ORDER BY in window definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 23 Jul 2016 19:31:22 -0000 Khurram Faraaz created DRILL-4803: ------------------------------------- Summary: NULLS are not first when NULLS FIRST is used with ORDER BY in window definition Key: DRILL-4803 URL: https://issues.apache.org/jira/browse/DRILL-4803 Project: Apache Drill Issue Type: Bug Components: Execution - Flow Affects Versions: 1.8.0 Environment: 4 node CentOS cluster Reporter: Khurram Faraaz NULLS FIRST is not honored when used with ORDER BY inside window definition. This in a wrong results issue. MapR Drill 1.8.0 commit ID : 34ca63ba {noformat} 0: jdbc:drill:schema=dfs.tmp> select c2, AVG(SUM(c1)) OVER(partition by c2 order by c2 nulls first) FROM `tblWnulls.parquet` group by c2; +-------+----------------+ | c2 | EXPR$1 | +-------+----------------+ | a | 11152.0 | | b | 41.0 | | c | 56.0 | | d | 4.294967315E9 | | e | 14.0 | | null | 1065555.0 | +-------+----------------+ 6 rows selected (0.227 seconds) {noformat} {noformat} postgres=# select c2, AVG(SUM(c1)) OVER(partition by c2 order by c2 nulls first) FROM t222 group by c2; c2 | avg ----+------------------------ | 1065555.000000000000 a | 11152.0000000000000000 b | 41.0000000000000000 c | 56.0000000000000000 d | 4294967315.00000000 e | 14.0000000000000000 (6 rows) {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)