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 081CE200D2E for ; Tue, 31 Oct 2017 22:49:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0684D1609EF; Tue, 31 Oct 2017 21:49:02 +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 4D1FE1609E6 for ; Tue, 31 Oct 2017 22:49:01 +0100 (CET) Received: (qmail 8090 invoked by uid 500); 31 Oct 2017 21:49:00 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 8078 invoked by uid 99); 31 Oct 2017 21:49:00 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Oct 2017 21:49:00 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6AF261A0A81 for ; Tue, 31 Oct 2017 21:48:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.879 X-Spam-Level: ** X-Spam-Status: No, score=2.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id QpsOZzQtAZnT for ; Tue, 31 Oct 2017 21:48:55 +0000 (UTC) Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com [209.85.217.169]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 12A245FAEA for ; Tue, 31 Oct 2017 21:48:55 +0000 (UTC) Received: by mail-ua0-f169.google.com with SMTP id w45so316676uac.3 for ; Tue, 31 Oct 2017 14:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=Fr2z7bi3FJ4f35q9hy2IYYhn2loWf+LUK5nNWR7mCxI=; b=TEtBtBmRHZU2xF0KDnMm9u2x3Frhyy8XjfTt6P8p8ZXuqC3l86iVJBFNpVGKVJsSj/ kny/t1AqfwuVlwtaezdhwW77+OeWF4mgqhIakPgZsDoBTOcherx3Opm+sAKLNrWu5Icd N6yUUreSndCysOd71V2bWwrmZzSiaWPegrHqiH04qfmkQPEhpkjB05uLA0Psarp0lQ5A vTLDPiR1rD1Mjx6Z76IPtDVQvHVp1hFzoGK9Ztw204pZAR8f4SVIUkz9+LHLXI6wmY97 HrSBXqhTdCrLME/872kDH8LtjUr0kj3cdjujy/n0/2zYAiWVcgbxdii9s945w8oIkk5s GnlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=Fr2z7bi3FJ4f35q9hy2IYYhn2loWf+LUK5nNWR7mCxI=; b=imA5kxrfbsQ4/WqGMPq7W/TFRAlOxJcO8t985nPvFtNdD1LszhV7O2cbpvIaNsSwug 0Yv2rSHXV+PrHh8W9kHoWJGY8DEOhY9XDN2LHIyLV9O19Ft+vuz/egoLtC9QFwPadZFm 1wz3nU5ZJgXZQiVS+eo1+SaqKUMKUb/a8Q05sma6w+oVKhNNxtpdpb3Xrep6vD9OE/vp HZQraqmm0eaHr/H3sOgLtA58lh2172/nJEET7oo/bMtzomDFJJNs2wzVASYIwkRd8qsj 9dc6JYLBuoqcO35fh/pAvwmeUee5X1HpqtwcwsLfX5SOC0wBTdXhQcHaUmpQ0i7qKNe5 Lq2A== X-Gm-Message-State: AMCzsaU/FA9kju7ouTHJUknol2IjRwlBT8GD0tMfNOu902JuhPEXehg7 +6Ifx0m8G5+0nxwJcGxU7mlrDqUcX4OKQ6mABnzszw== X-Google-Smtp-Source: ABhQp+R6yQSX7D86CaafUmY1p7RF5zmqrAR7Ri1mgzGCSthiqMQSjZO51+e6btzpPKuQlQF1SO6urDojMKLb4tIy85k= X-Received: by 10.176.89.176 with SMTP id g45mr2938732uad.184.1509486533557; Tue, 31 Oct 2017 14:48:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.71.4 with HTTP; Tue, 31 Oct 2017 14:48:53 -0700 (PDT) From: Zachary Amsden Date: Tue, 31 Oct 2017 14:48:53 -0700 Message-ID: Subject: IMPALA-5607 To: "dev@impala" , jinchul@gmail.com Cc: Greg Rahn Content-Type: multipart/alternative; boundary="001a11465d5aa05eaa055cdeb851" archived-at: Tue, 31 Oct 2017 21:49:02 -0000 --001a11465d5aa05eaa055cdeb851 Content-Type: text/plain; charset="UTF-8" In discussion about IMPALA-5607, it came up that implementing this as described is a compatibility breaking change. There are a couple of required changes: 1) Return data type for date_part and EXTRACT FROM must be promoted to BIGINT. 2) MILLISECONDS now will include seconds part in the calculation of milliseconds. I think the first is a non-issue; we're promoting the type to be wide enough to hold nanoseconds precision values (with the seconds component included). An alternative could be to return this as a decimal type, but that seems rather unwieldy for other date expressions so I'd prefer these values to all be returned as integral types. The bigger issue is including seconds in the calculation of milliseconds, microseconds and nanoseconds breaks the existing value returned for milliseconds, which is just bare milliseconds with no seconds component. For compatibility with other SQL implementations, I think we'd like to include seconds with all of these date parts, but that is certainly debatable. The question then, is anyone relying on this functionality that can't easily workaround such a change? The Impala documentation doesn't specify this behavior either way, and there isn't a formal specification for how sub-second granularity time is handled. Whatever we decide, we should document this going forward. - Zach --001a11465d5aa05eaa055cdeb851--