hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Long, Andrew" <loand...@amazon.com>
Subject Possible Bug: to_date("2015-01-15") returns a string
Date Thu, 30 Jun 2016 23:31:30 GMT
Hello Everyone,

I ran into this unusual behavior while converting a date string into a date.  I was surprised
to find out that to_date will occasionally return a string.

Does this make sense?

Cheers Andrew



hive> CREATE TEMPORARY TABLE datebug
    > AS SELECT to_date("2015-01-10");
Query ID = hadoop_20160630232727_15668184-3af0-4221-a794-9b2a94d4740e
Total jobs = 1
Launching Job 1 out of 1
Tez session was closed. Reopening...
Session re-established.


Status: Running (Executing on YARN cluster with App id application_1467163153575_0039)

--------------------------------------------------------------------------------
        VERTICES      STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
--------------------------------------------------------------------------------
Map 1 ..........   SUCCEEDED      1          1        0        0       0       0
--------------------------------------------------------------------------------
VERTICES: 01/01  [==========================>>] 100%  ELAPSED TIME: 5.77 s
--------------------------------------------------------------------------------
Moving data to: hdfs://ip-172-31-1-35.ec2.internal:8020/tmp/hive/hadoop/a1f9f4d0-36ed-419f-bec3-9b286a7c1201/_tmp_space.db/9c51562e-f8a1-4de8-93a5-f3e874368f43
Table default.datebug stats: [numFiles=1, numRows=1, totalSize=11, rawDataSize=10]
OK
Time taken: 11.968 seconds
hive> describe datebug;
OK
_c0                    string
Time taken: 0.004 seconds, Fetched: 1 row(s)
hive>

Mime
View raw message