Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-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 C8FFE181CB for ; Wed, 1 Jul 2015 22:36:04 +0000 (UTC) Received: (qmail 3023 invoked by uid 500); 1 Jul 2015 22:36:04 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 2995 invoked by uid 500); 1 Jul 2015 22:36:04 -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 2985 invoked by uid 99); 1 Jul 2015 22:36:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2015 22:36:04 +0000 Date: Wed, 1 Jul 2015 22:36:04 +0000 (UTC) From: "Chris Westin (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-3432) Change or document: CAST to interval type doesn't reject non-standard strings MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-3432?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Westin updated DRILL-3432: -------------------------------- Component/s: Functions - Drill > Change or document: CAST to interval type doesn't reject non-standard str= ings > -------------------------------------------------------------------------= ---- > > Key: DRILL-3432 > URL: https://issues.apache.org/jira/browse/DRILL-3432 > Project: Apache Drill > Issue Type: Bug > Components: Functions - Drill > Reporter: Daniel Barclay (Drill) > Fix For: 1.2.0 > > > In ISO/IEC 9075-2:2011(E) section 6.13 , General Rule= 19 case b says that, in a casting to an interval type= , a character string value must be a valid interval () or , or else a "data exception =E2=80=94 = invalid interval format" exception is raised. > ( is the "{{INTERVAL '1-6' YEAR TO MONTH}}" syntax; is the "{{1-6}}" syntax.) > However, in Drill, a cast specification casting to an interval type accep= ts strings not allowed by the SQL standard (ISO-8601 durations, e.g., "{{P1= Y6M"}}). >   > Drill should either follow the SQL standard or document the non-standard = behavior in the end-user documentation. >   > (Note that Drill's current behavior is not quite an extension: Although = it does extend the set of strings that can be converted, it lacks the rejec= tion of non-standard strings (for, say, validating strings destined for inp= ut into a standard-SQL system).) > To continue providing the ability to convert ISO-8601-format duration str= ings into interval values without being non-compliant with the SQL standard= , Drill could provide the conversions in conversion functions (perhaps CONV= ERT_FROM and/or CONVERT_TO). -- This message was sent by Atlassian JIRA (v6.3.4#6332)