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 16DD6200B71 for ; Wed, 31 Aug 2016 12:11:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 15289160AB4; Wed, 31 Aug 2016 10:11: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 5CF42160A8C for ; Wed, 31 Aug 2016 12:11:21 +0200 (CEST) Received: (qmail 18315 invoked by uid 500); 31 Aug 2016 10:11:20 -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 18304 invoked by uid 99); 31 Aug 2016 10:11:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Aug 2016 10:11:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7C1362C014C for ; Wed, 31 Aug 2016 10:11:20 +0000 (UTC) Date: Wed, 31 Aug 2016 10:11:20 +0000 (UTC) From: "Serge Harnyk (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4864) Add ANSI format for date/time functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 31 Aug 2016 10:11:22 -0000 [ https://issues.apache.org/jira/browse/DRILL-4864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Serge Harnyk updated DRILL-4864: -------------------------------- Description: The TO_DATE() is exposing the Joda string formatting conventions into the SQL layer. This is not following SQL conventions used by ANSI and many other database engines on the market. Add new UDF "ansi_to_joda(string1, string2)", that takes string that represents ANSI datetime format and returns string that represents equal Joda format. Add new session option "drill.exec.fn.to_date_format" that can be one of two values - "JODA"(default) and "ANSI". If option is set to "JODA" queries with to_date() function would work in usual way. If option is set to "ANSI" second argument would be wrapped with ansi_to_joda() function, that allows user to use ANSI datetime format Wrapping is used in to_date(), to_time() and to_timestamp() functions. was: The TO_DATE() is exposing the Joda string formatting conventions into the SQL layer. This is not following SQL conventions used by ANSI and many other database engines on the market. Add new UDF "ansi_to_joda(string1, string2)", that takes string that represents ANSI datetime format and returns string that represents equal Joda format. Add new session option "drill.exec.fn.to_date_format" that can be one of two values - "JODA"(default) and "ANSI". If option is set to "JODA" queries with to_date() function would work in usual way. If option is set to "ANSI" second argument would be wrapped with ansi_to_joda() function, that allows user to use ANSI datetime format Wrapping is used in to_date(), to_time() and to_timestamp() functions. > Add ANSI format for date/time functions > --------------------------------------- > > Key: DRILL-4864 > URL: https://issues.apache.org/jira/browse/DRILL-4864 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.8.0 > Reporter: Serge Harnyk > Assignee: Serge Harnyk > Fix For: 1.9.0 > > Attachments: jodatime_ansi.odt > > > The TO_DATE() is exposing the Joda string formatting conventions into the SQL layer. This is not following SQL conventions used by ANSI and many other database engines on the market. > Add new UDF "ansi_to_joda(string1, string2)", that takes string that represents ANSI datetime format and returns string that represents equal Joda format. > Add new session option "drill.exec.fn.to_date_format" that can be one of two values - "JODA"(default) and "ANSI". > If option is set to "JODA" queries with to_date() function would work in usual way. > If option is set to "ANSI" second argument would be wrapped with ansi_to_joda() function, that allows user to use ANSI datetime format > Wrapping is used in to_date(), to_time() and to_timestamp() functions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)