mirror of
https://github.com/apache/impala.git
synced 2026-01-04 09:00:56 -05:00
Adds Impala support for TIMESTAMP types stored in Kudu. Impala stores TIMESTAMP values in 96-bits and has nanosecond precision. Kudu's timestamp is a 64-bit microsecond delta from the Unix epoch (called UNIXTIME_MICROS), so a conversion is necessary. When writing to Kudu, TIMESTAMP values in nanoseconds are averaged to the nearest microsecond. When reading from Kudu, the KuduScanner returns UNIXTIME_MICROS with 8bytes of padding so Impala can convert the value to a TimestampValue in-line and copy the entire row. Testing: Updated the functional_kudu schema to use TIMESTAMPs instead of converting to STRING, so this provides some decent coverage. Some BE tests were added, and some EE tests as well. TODO: Support pushing down TIMESTAMP predicates TODO: Support TIMESTAMPs in range partitioning expressions Change-Id: Iae6ccfffb79118a9036fb2227dba3a55356c896d Reviewed-on: http://gerrit.cloudera.org:8080/6526 Reviewed-by: Matthew Jacobs <mj@cloudera.com> Tested-by: Impala Public Jenkins
12 lines
253 B
Plaintext
12 lines
253 B
Plaintext
====
|
|
---- QUERY
|
|
select * from times
|
|
---- RESULTS
|
|
0,1987-05-19 00:00:00
|
|
1,NULL
|
|
---- TYPES
|
|
INT,TIMESTAMP
|
|
---- ERRORS
|
|
Kudu table 'impala::$DATABASE.times' column 'ts' contains an out of range timestamp. The valid date range is 1400-01-01..9999-12-31.
|
|
====
|