From dev-return-154590-archive-asf-public=cust-asf.ponee.io@hive.apache.org Thu Jan 23 08:53:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 74A5518025F for ; Thu, 23 Jan 2020 09:53:03 +0100 (CET) Received: (qmail 53169 invoked by uid 500); 23 Jan 2020 08:53:02 -0000 Mailing-List: contact dev-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 dev@hive.apache.org Received: (qmail 53151 invoked by uid 99); 23 Jan 2020 08:53:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2020 08:53:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7A43EE0175 for ; Thu, 23 Jan 2020 08:53:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 29A64780441 for ; Thu, 23 Jan 2020 08:53:00 +0000 (UTC) Date: Thu, 23 Jan 2020 08:53:00 +0000 (UTC) From: "Karen Coppage (Jira)" To: dev@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HIVE-22762) Leap day is incorrectly parsed during cast in Hive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Karen Coppage created HIVE-22762: ------------------------------------ Summary: Leap day is incorrectly parsed during cast in Hive Key: HIVE-22762 URL: https://issues.apache.org/jira/browse/HIVE-22762 Project: Hive Issue Type: Bug Components: HiveServer2 Reporter: Karen Coppage Assignee: Karen Coppage Fix For: 4.0.0 While casting a string to a date with a custom date format having day token before year and moth tokens, the date is parsed incorrectly for leap days. h3. How to reproduce Execute {code}select cast("29 02 0" as date format "dd mm rr"){code} with Hive. The query results in *2020-02-28*, incorrectly. ---- Executing the another cast with a slightly modified representation of the date (day is preceded by year and moth) is however correctly parsed: {code}select cast("0 02 29" as date format "rr mm dd"){code} It returns *2020-02-29*. -- This message was sent by Atlassian Jira (v8.3.4#803005)