Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-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 F41C517EF3 for ; Wed, 25 Mar 2015 18:22:07 +0000 (UTC) Received: (qmail 97947 invoked by uid 500); 25 Mar 2015 18:21:54 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 97820 invoked by uid 500); 25 Mar 2015 18:21:54 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 97692 invoked by uid 99); 25 Mar 2015 18:21:54 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Mar 2015 18:21:54 +0000 Date: Wed, 25 Mar 2015 18:21:54 +0000 (UTC) From: "Alexander Pivovarov (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-9518) Implement MONTHS_BETWEEN aligned with Oracle one 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/HIVE-9518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexander Pivovarov updated HIVE-9518: -------------------------------------- Component/s: UDF > Implement MONTHS_BETWEEN aligned with Oracle one > ------------------------------------------------ > > Key: HIVE-9518 > URL: https://issues.apache.org/jira/browse/HIVE-9518 > Project: Hive > Issue Type: Bug > Components: UDF > Reporter: Xiaobing Zhou > Assignee: Alexander Pivovarov > Attachments: HIVE-9518.1.patch, HIVE-9518.2.patch, HIVE-9518.3.patch, HIVE-9518.4.patch, HIVE-9518.5.patch > > > This is used to track work to build Oracle like months_between. Here's semantics: > MONTHS_BETWEEN returns number of months between dates date1 and date2. If date1 is later than date2, then the result is positive. If date1 is earlier than date2, then the result is negative. If date1 and date2 are either the same days of the month or both last days of months, then the result is always an integer. Otherwise Oracle Database calculates the fractional portion of the result based on a 31-day month and considers the difference in time components date1 and date2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)