Ian Hellstrom created DRILL-4507:
------------------------------------

             Summary: 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 `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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to