Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BFFD184C2 for ; Tue, 30 Jun 2015 19:53:11 +0000 (UTC) Received: (qmail 30043 invoked by uid 500); 30 Jun 2015 19:53:05 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 29942 invoked by uid 500); 30 Jun 2015 19:53:05 -0000 Mailing-List: contact dev-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 dev@drill.apache.org Received: (qmail 29644 invoked by uid 99); 30 Jun 2015 19:53:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2015 19:53:04 +0000 Date: Tue, 30 Jun 2015 19:53:04 +0000 (UTC) From: "Daniel Barclay (Drill) (JIRA)" To: dev@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (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 Daniel Barclay (Drill) created DRILL-3432: --------------------------------------------- Summary: Change or document: CAST to interval type doesn't rej= ect non-standard strings Key: DRILL-3432 URL: https://issues.apache.org/jira/browse/DRILL-3432 Project: Apache Drill Issue Type: Bug Reporter: Daniel Barclay (Drill) In ISO/IEC 9075-2:2011(E) section 6.13 , General Rule 1= 9 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 in= valid 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 accepts= strings not allowed by the SQL standard (ISO-8601 durations, e.g., "{{P1Y6= M"}}).   Drill should either follow the SQL standard or document the non-standard be= havior 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 rejecti= on of non-standard strings (for, say, validating strings destined for input= into a standard-SQL system).) To continue providing the ability to convert ISO-8601-format duration strin= gs into interval values without being non-compliant with the SQL standard, = Drill could provide the conversions in conversion functions (perhaps CONVER= T_FROM and/or CONVERT_TO). -- This message was sent by Atlassian JIRA (v6.3.4#6332)