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 A850118301 for ; Mon, 14 Mar 2016 12:39:33 +0000 (UTC) Received: (qmail 62770 invoked by uid 500); 14 Mar 2016 12:39:33 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 62741 invoked by uid 500); 14 Mar 2016 12:39:33 -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 62727 invoked by uid 99); 14 Mar 2016 12:39:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Mar 2016 12:39:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 79C892C1F56 for ; Mon, 14 Mar 2016 12:39:33 +0000 (UTC) Date: Mon, 14 Mar 2016 12:39:33 +0000 (UTC) From: "Ian Hellstrom (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-4507) TO_TIMESTAMP does not generate TIMESTAMP data type in metadata 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/DRILL-4507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ian Hellstrom updated DRILL-4507: --------------------------------- Description: When creating a view that contains the TO_TIMESTAMP() casting function, the resulting column does not show up as a TIMESTAMP but rather as data type ANY: {code} CREATE VIEW timestamp_test AS SELECT TO_TIMESTAMP('2008-2-23 12:00:00', 'yyyy-MM-dd HH:mm:ss') FROM (VALUES(1)); DESCRIBE timestamp_test; {code} yields: {code} +--------------+------------+--------------+ | COLUMN_NAME | DATA_TYPE | IS_NULLABLE | +--------------+------------+--------------+ | EXPR$0 | ANY | YES | +--------------+------------+--------------+ {code} The same is true when using TO_DATE and SUBSTR. Explicit casts with CAST(ts AS TIMESTAMP) or CAST(str AS VARCHAR(10)) work as expected. was: When creating a view that contains the TO_TIMESTAMP() casting function, the resulting column does not show up as a TIMESTAMP but rather as data type ANY: {code} CREATE VIEW timestamp_test AS SELECT TO_TIMESTAMP('2008-2-23 12:00:00', 'yyyy-MM-dd HH:mm:ss') FROM (VALUES(1)); DESCRIBE timestamp_test; {code} yields: {code} +--------------+------------+--------------+ | COLUMN_NAME | DATA_TYPE | IS_NULLABLE | +--------------+------------+--------------+ | EXPR$0 | ANY | YES | +--------------+------------+--------------+ {code} The same is true when using SUBSTR, which ought to return strings, but in reality shows up as ANY in the description. Explicit casts with CAST(ts AS TIMESTAMP) or CAST(str AS VARCHAR(10)) work as expected. > TO_TIMESTAMP does not generate TIMESTAMP data type in metadata > -------------------------------------------------------------- > > Key: DRILL-4507 > URL: https://issues.apache.org/jira/browse/DRILL-4507 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Data Types > Affects Versions: 1.5.0 > Reporter: Ian Hellstrom > > When creating a view that contains the TO_TIMESTAMP() casting function, the resulting column does not show up as a TIMESTAMP but rather as data type ANY: > {code} > CREATE VIEW timestamp_test AS SELECT TO_TIMESTAMP('2008-2-23 12:00:00', 'yyyy-MM-dd HH:mm:ss') FROM (VALUES(1)); > DESCRIBE timestamp_test; > {code} > yields: > {code} > +--------------+------------+--------------+ > | COLUMN_NAME | DATA_TYPE | IS_NULLABLE | > +--------------+------------+--------------+ > | EXPR$0 | ANY | YES | > +--------------+------------+--------------+ > {code} > The same is true when using TO_DATE and SUBSTR. > Explicit casts with CAST(ts AS TIMESTAMP) or CAST(str AS VARCHAR(10)) work as expected. -- This message was sent by Atlassian JIRA (v6.3.4#6332)