Details
-
New Feature
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
Impala 2.2.4
-
None
Description
Examples:
select TIMESTAMP '2010-03-25'; select TIMESTAMP '2010-03-25 12:47:32'; select TIMESTAMP '2010-03-25 12:55:49.123456';
From the ANSI SQL/Foundation spec:
<timestamp literal> ::= TIMESTAMP <timestamp string> <date string> ::= <quote> <unquoted date string> <quote> <time string> ::= <quote> <unquoted time string> <quote> <timestamp string> ::= <quote> <unquoted timestamp string> <quote> <time zone interval> ::= <sign> <hours value> <colon> <minutes value> <date value> ::= <years value> <minus sign> <months value> <minus sign> <days value> <time value> ::= <hours value> <colon> <minutes value> <colon> <seconds value> <interval literal> ::= INTERVAL [ <sign> ] <interval string> <interval qualifier> <interval string> ::= <quote> <unquoted interval string> <quote> <unquoted date string> ::= <date value> <unquoted time string> ::= <time value> [ <time zone interval> ] <unquoted timestamp string> ::= <unquoted date string> <space> <unquoted time string> <unquoted interval string> ::= [ <sign> ] { <year-month literal> | <day-time literal> } <year-month literal> ::= <years value> [ <minus sign> <months value> ] | <months value> <day-time literal> ::= <day-time interval> | <time interval> <day-time interval> ::= <days value> [ <space> <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ] ] <time interval> ::= <hours value> [ <colon> <minutes value> [ <colon> <seconds value> ] ] | <minutes value> [ <colon> <seconds value> ] | <seconds value> <years value> ::= <datetime value> <months value> ::= <datetime value> <days value> ::= <datetime value> <hours value> ::= <datetime value> <minutes value> ::= <datetime value> <seconds value> ::= <seconds integer value> [ <period> [ <seconds fraction> ] ] <seconds integer value> ::= <unsigned integer> <seconds fraction> ::= <unsigned integer> <datetime value> ::= <unsigned integer>
Attachments
Issue Links
- is related to
-
IMPALA-1734 cast(<string> as timestamp) should not require zero padded elements
- Closed