DATE data type
DATE data type to store date values.
DATE data type to store date values. The
DATE type is supported for HBase, Text, Avro, and
0001-01-01 to 9999-12-31
Literals and expressions:
DATE literals are in the form of
DATE'YYYY-MM-DD'. For example,
Parquet and Avro considerations:
Parquet and Avro use
DATE logical type for dates. The
DATE logical type annotates an
that stores the number of days from the Unix epoch, January 1, 1970.
This representation introduces an interoperability issue between Impala
and older versions of Hive:
If Hive versions lower than 3.1 wrote dates earlier than 1582-10-15 to a Parquet or Avro table, those dates will be read back incorrectly by Impala and vice versa. In Hive 3.1 and higher, this is no longer an issue.
Explicit casting between DATE and other data types:
DATE type can only be converted to/from
STRING types as described below.
|Cast from||Cast to||Result|
|| The date component of the
If the time component is present in
|| The year, month, and day of the
Implicit casting between DATE and other types:
Implicit casting is supported:
DATEif the source
STRINGvalue is in the
DATE type is available in Impala 3.3 and higher.
You can read and write DATE values to Kudu tables. For example:
create table kudu_date_key (fdatekey date primary key, val string) stored as kudu insert into kudu_date_key values (DATE '1970-01-01', 'Unix epoch'), (DATE '2019-12-12', 'today')