PREHOOK: query: DESCRIBE FUNCTION trunc PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION trunc POSTHOOK: type: DESCFUNCTION trunc(date, fmt) - Returns returns date with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, then date is truncated to the nearest day. It now only supports 'MONTH'/'MON'/'MM' and 'YEAR'/'YYYY'/'YY' as format. PREHOOK: query: DESCRIBE FUNCTION EXTENDED trunc PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED trunc POSTHOOK: type: DESCFUNCTION trunc(date, fmt) - Returns returns date with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, then date is truncated to the nearest day. It now only supports 'MONTH'/'MON'/'MM' and 'YEAR'/'YYYY'/'YY' as format. date is a string in the format 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd'. The time part of date is ignored. Example: > SELECT trunc('2009-02-12', 'MM'); OK '2009-02-01' > SELECT trunc('2015-10-27', 'YEAR'); OK '2015-01-01' PREHOOK: query: --test string with 'MM' as format EXPLAIN SELECT TRUNC('2014-01-01', 'MM'), TRUNC('2014-01-14', 'MM'), TRUNC('2014-01-31', 'MM'), TRUNC('2014-02-02', 'MM'), TRUNC('2014-02-28', 'MM'), TRUNC('2016-02-03', 'MM'), TRUNC('2016-02-28', 'MM'), TRUNC('2016-02-29', 'MM'), TRUNC('2014-01-01 10:30:45', 'MM'), TRUNC('2014-01-14 10:30:45', 'MM'), TRUNC('2014-01-31 10:30:45', 'MM'), TRUNC('2014-02-02 10:30:45', 'MM'), TRUNC('2014-02-28 10:30:45', 'MM'), TRUNC('2016-02-03 10:30:45', 'MM'), TRUNC('2016-02-28 10:30:45', 'MM'), TRUNC('2016-02-29 10:30:45', 'MM') PREHOOK: type: QUERY POSTHOOK: query: --test string with 'MM' as format EXPLAIN SELECT TRUNC('2014-01-01', 'MM'), TRUNC('2014-01-14', 'MM'), TRUNC('2014-01-31', 'MM'), TRUNC('2014-02-02', 'MM'), TRUNC('2014-02-28', 'MM'), TRUNC('2016-02-03', 'MM'), TRUNC('2016-02-28', 'MM'), TRUNC('2016-02-29', 'MM'), TRUNC('2014-01-01 10:30:45', 'MM'), TRUNC('2014-01-14 10:30:45', 'MM'), TRUNC('2014-01-31 10:30:45', 'MM'), TRUNC('2014-02-02 10:30:45', 'MM'), TRUNC('2014-02-28 10:30:45', 'MM'), TRUNC('2016-02-03 10:30:45', 'MM'), TRUNC('2016-02-28 10:30:45', 'MM'), TRUNC('2016-02-29 10:30:45', 'MM') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-02-01' (type: string), '2014-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-02-01' (type: string), '2014-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC('2014-01-01', 'MM'), TRUNC('2014-01-14', 'MM'), TRUNC('2014-01-31', 'MM'), TRUNC('2014-02-02', 'MM'), TRUNC('2014-02-28', 'MM'), TRUNC('2016-02-03', 'MM'), TRUNC('2016-02-28', 'MM'), TRUNC('2016-02-29', 'MM'), TRUNC('2014-01-01 10:30:45', 'MM'), TRUNC('2014-01-14 10:30:45', 'MM'), TRUNC('2014-01-31 10:30:45', 'MM'), TRUNC('2014-02-02 10:30:45', 'MM'), TRUNC('2014-02-28 10:30:45', 'MM'), TRUNC('2016-02-03 10:30:45', 'MM'), TRUNC('2016-02-28 10:30:45', 'MM'), TRUNC('2016-02-29 10:30:45', 'MM') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC('2014-01-01', 'MM'), TRUNC('2014-01-14', 'MM'), TRUNC('2014-01-31', 'MM'), TRUNC('2014-02-02', 'MM'), TRUNC('2014-02-28', 'MM'), TRUNC('2016-02-03', 'MM'), TRUNC('2016-02-28', 'MM'), TRUNC('2016-02-29', 'MM'), TRUNC('2014-01-01 10:30:45', 'MM'), TRUNC('2014-01-14 10:30:45', 'MM'), TRUNC('2014-01-31 10:30:45', 'MM'), TRUNC('2014-02-02 10:30:45', 'MM'), TRUNC('2014-02-28 10:30:45', 'MM'), TRUNC('2016-02-03 10:30:45', 'MM'), TRUNC('2016-02-28 10:30:45', 'MM'), TRUNC('2016-02-29 10:30:45', 'MM') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-02-01 2014-02-01 2016-02-01 2016-02-01 2016-02-01 2014-01-01 2014-01-01 2014-01-01 2014-02-01 2014-02-01 2016-02-01 2016-02-01 2016-02-01 PREHOOK: query: --test string with 'YEAR' as format EXPLAIN SELECT TRUNC('2014-01-01', 'YEAR'), TRUNC('2014-01-14', 'YEAR'), TRUNC('2014-01-31', 'YEAR'), TRUNC('2014-02-02', 'YEAR'), TRUNC('2014-02-28', 'YEAR'), TRUNC('2016-02-03', 'YEAR'), TRUNC('2016-02-28', 'YEAR'), TRUNC('2016-02-29', 'YEAR'), TRUNC('2014-01-01 10:30:45', 'YEAR'), TRUNC('2014-01-14 10:30:45', 'YEAR'), TRUNC('2014-01-31 10:30:45', 'YEAR'), TRUNC('2014-02-02 10:30:45', 'YEAR'), TRUNC('2014-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-03 10:30:45', 'YEAR'), TRUNC('2016-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-29 10:30:45', 'YEAR') PREHOOK: type: QUERY POSTHOOK: query: --test string with 'YEAR' as format EXPLAIN SELECT TRUNC('2014-01-01', 'YEAR'), TRUNC('2014-01-14', 'YEAR'), TRUNC('2014-01-31', 'YEAR'), TRUNC('2014-02-02', 'YEAR'), TRUNC('2014-02-28', 'YEAR'), TRUNC('2016-02-03', 'YEAR'), TRUNC('2016-02-28', 'YEAR'), TRUNC('2016-02-29', 'YEAR'), TRUNC('2014-01-01 10:30:45', 'YEAR'), TRUNC('2014-01-14 10:30:45', 'YEAR'), TRUNC('2014-01-31 10:30:45', 'YEAR'), TRUNC('2014-02-02 10:30:45', 'YEAR'), TRUNC('2014-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-03 10:30:45', 'YEAR'), TRUNC('2016-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-29 10:30:45', 'YEAR') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC('2014-01-01', 'YEAR'), TRUNC('2014-01-14', 'YEAR'), TRUNC('2014-01-31', 'YEAR'), TRUNC('2014-02-02', 'YEAR'), TRUNC('2014-02-28', 'YEAR'), TRUNC('2016-02-03', 'YEAR'), TRUNC('2016-02-28', 'YEAR'), TRUNC('2016-02-29', 'YEAR'), TRUNC('2014-01-01 10:30:45', 'YEAR'), TRUNC('2014-01-14 10:30:45', 'YEAR'), TRUNC('2014-01-31 10:30:45', 'YEAR'), TRUNC('2014-02-02 10:30:45', 'YEAR'), TRUNC('2014-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-03 10:30:45', 'YEAR'), TRUNC('2016-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-29 10:30:45', 'YEAR') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC('2014-01-01', 'YEAR'), TRUNC('2014-01-14', 'YEAR'), TRUNC('2014-01-31', 'YEAR'), TRUNC('2014-02-02', 'YEAR'), TRUNC('2014-02-28', 'YEAR'), TRUNC('2016-02-03', 'YEAR'), TRUNC('2016-02-28', 'YEAR'), TRUNC('2016-02-29', 'YEAR'), TRUNC('2014-01-01 10:30:45', 'YEAR'), TRUNC('2014-01-14 10:30:45', 'YEAR'), TRUNC('2014-01-31 10:30:45', 'YEAR'), TRUNC('2014-02-02 10:30:45', 'YEAR'), TRUNC('2014-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-03 10:30:45', 'YEAR'), TRUNC('2016-02-28 10:30:45', 'YEAR'), TRUNC('2016-02-29 10:30:45', 'YEAR') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2016-01-01 2016-01-01 2016-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2016-01-01 2016-01-01 2016-01-01 PREHOOK: query: --test timestamp with 'MM' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'MM') PREHOOK: type: QUERY POSTHOOK: query: --test timestamp with 'MM' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'MM') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-02-01' (type: string), '2014-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-02-01' (type: string), '2014-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'MM') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'MM'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'MM') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-02-01 2014-02-01 2016-02-01 2016-02-01 2016-02-01 2014-01-01 2014-01-01 2014-01-01 2014-02-01 2014-02-01 2016-02-01 2016-02-01 2016-02-01 PREHOOK: query: --test timestamp with 'YEAR' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'YEAR') PREHOOK: type: QUERY POSTHOOK: query: --test timestamp with 'YEAR' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'YEAR') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'YEAR') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC(CAST('2014-01-01 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 00:00:00' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-01 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-14 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-01-31 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-02 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2014-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-03 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-28 10:30:45' AS TIMESTAMP), 'YEAR'), TRUNC(CAST('2016-02-29 10:30:45' AS TIMESTAMP), 'YEAR') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2016-01-01 2016-01-01 2016-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2016-01-01 2016-01-01 2016-01-01 PREHOOK: query: --test date with 'MM' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01' AS DATE), 'MM'), TRUNC(CAST('2014-01-14' AS DATE), 'MM'), TRUNC(CAST('2014-01-31' AS DATE), 'MM'), TRUNC(CAST('2014-02-02' AS DATE), 'MM'), TRUNC(CAST('2014-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-03' AS DATE), 'MM'), TRUNC(CAST('2016-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-29' AS DATE), 'MM') PREHOOK: type: QUERY POSTHOOK: query: --test date with 'MM' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01' AS DATE), 'MM'), TRUNC(CAST('2014-01-14' AS DATE), 'MM'), TRUNC(CAST('2014-01-31' AS DATE), 'MM'), TRUNC(CAST('2014-02-02' AS DATE), 'MM'), TRUNC(CAST('2014-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-03' AS DATE), 'MM'), TRUNC(CAST('2016-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-29' AS DATE), 'MM') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-02-01' (type: string), '2014-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string), '2016-02-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC(CAST('2014-01-01' AS DATE), 'MM'), TRUNC(CAST('2014-01-14' AS DATE), 'MM'), TRUNC(CAST('2014-01-31' AS DATE), 'MM'), TRUNC(CAST('2014-02-02' AS DATE), 'MM'), TRUNC(CAST('2014-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-03' AS DATE), 'MM'), TRUNC(CAST('2016-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-29' AS DATE), 'MM') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC(CAST('2014-01-01' AS DATE), 'MM'), TRUNC(CAST('2014-01-14' AS DATE), 'MM'), TRUNC(CAST('2014-01-31' AS DATE), 'MM'), TRUNC(CAST('2014-02-02' AS DATE), 'MM'), TRUNC(CAST('2014-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-03' AS DATE), 'MM'), TRUNC(CAST('2016-02-28' AS DATE), 'MM'), TRUNC(CAST('2016-02-29' AS DATE), 'MM') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-02-01 2014-02-01 2016-02-01 2016-02-01 2016-02-01 PREHOOK: query: --test date with 'YEAR' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-14' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-31' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-02' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-03' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-29' AS DATE), 'YEAR') PREHOOK: type: QUERY POSTHOOK: query: --test date with 'YEAR' as format EXPLAIN SELECT TRUNC(CAST('2014-01-01' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-14' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-31' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-02' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-03' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-29' AS DATE), 'YEAR') POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2014-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string), '2016-01-01' (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC(CAST('2014-01-01' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-14' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-31' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-02' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-03' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-29' AS DATE), 'YEAR') PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC(CAST('2014-01-01' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-14' AS DATE), 'YEAR'), TRUNC(CAST('2014-01-31' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-02' AS DATE), 'YEAR'), TRUNC(CAST('2014-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-03' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-28' AS DATE), 'YEAR'), TRUNC(CAST('2016-02-29' AS DATE), 'YEAR') POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2014-01-01 2016-01-01 2016-01-01 2016-01-01 PREHOOK: query: --test misc with 'MM' as format EXPLAIN SELECT TRUNC('2014-01-34', 'MM'), TRUNC(CAST(null AS STRING), 'MM'), TRUNC(CAST(null AS DATE), 'MM'), TRUNC(CAST(null AS TIMESTAMP), 'MM'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) PREHOOK: type: QUERY POSTHOOK: query: --test misc with 'MM' as format EXPLAIN SELECT TRUNC('2014-01-34', 'MM'), TRUNC(CAST(null AS STRING), 'MM'), TRUNC(CAST(null AS DATE), 'MM'), TRUNC(CAST(null AS TIMESTAMP), 'MM'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-02-01' (type: string), null (type: string), null (type: string), null (type: string), null (type: string), null (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC('2014-01-34', 'MM'), TRUNC(CAST(null AS STRING), 'MM'), TRUNC(CAST(null AS DATE), 'MM'), TRUNC(CAST(null AS TIMESTAMP), 'MM'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC('2014-01-34', 'MM'), TRUNC(CAST(null AS STRING), 'MM'), TRUNC(CAST(null AS DATE), 'MM'), TRUNC(CAST(null AS TIMESTAMP), 'MM'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-02-01 NULL NULL NULL NULL NULL PREHOOK: query: --test misc with 'YEAR' as format EXPLAIN SELECT TRUNC('2014-01-34', 'YEAR'), TRUNC(CAST(null AS STRING), 'YEAR'), TRUNC(CAST(null AS DATE), 'YEAR'), TRUNC(CAST(null AS TIMESTAMP), 'YEAR'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) PREHOOK: type: QUERY POSTHOOK: query: --test misc with 'YEAR' as format EXPLAIN SELECT TRUNC('2014-01-34', 'YEAR'), TRUNC(CAST(null AS STRING), 'YEAR'), TRUNC(CAST(null AS DATE), 'YEAR'), TRUNC(CAST(null AS TIMESTAMP), 'YEAR'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: _dummy_table Row Limit Per Split: 1 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE Select Operator expressions: '2014-01-01' (type: string), null (type: string), null (type: string), null (type: string), null (type: string), null (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5 Statistics: Num rows: 0 Data size: 1 Basic stats: PARTIAL Column stats: COMPLETE ListSink PREHOOK: query: SELECT TRUNC('2014-01-34', 'YEAR'), TRUNC(CAST(null AS STRING), 'YEAR'), TRUNC(CAST(null AS DATE), 'YEAR'), TRUNC(CAST(null AS TIMESTAMP), 'YEAR'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) PREHOOK: type: QUERY PREHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### POSTHOOK: query: SELECT TRUNC('2014-01-34', 'YEAR'), TRUNC(CAST(null AS STRING), 'YEAR'), TRUNC(CAST(null AS DATE), 'YEAR'), TRUNC(CAST(null AS TIMESTAMP), 'YEAR'), TRUNC('2014-01-01', 'M'), TRUNC('2014-01-01', CAST(null AS STRING)) POSTHOOK: type: QUERY POSTHOOK: Input: _dummy_database@_dummy_table #### A masked pattern was here #### 2014-01-01 NULL NULL NULL NULL NULL