PREHOOK: query: DESCRIBE FUNCTION coalesce PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION coalesce POSTHOOK: type: DESCFUNCTION coalesce(a1, a2, ...) - Returns the first non-null argument PREHOOK: query: DESCRIBE FUNCTION EXTENDED coalesce PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED coalesce POSTHOOK: type: DESCFUNCTION coalesce(a1, a2, ...) - Returns the first non-null argument Example: > SELECT coalesce(NULL, 1, NULL) FROM src LIMIT 1; 1 PREHOOK: query: EXPLAIN SELECT COALESCE(1), COALESCE(1, 2), COALESCE(NULL, 2), COALESCE(1, NULL), COALESCE(NULL, NULL, 3), COALESCE(4, NULL, NULL, NULL), COALESCE('1'), COALESCE('1', '2'), COALESCE(NULL, '2'), COALESCE('1', NULL), COALESCE(NULL, NULL, '3'), COALESCE('4', NULL, NULL, NULL), COALESCE(1.0), COALESCE(1.0, 2.0), COALESCE(NULL, 2.0), COALESCE(NULL, 2.0, 3.0), COALESCE(2.0, NULL, 3.0), COALESCE(IF(TRUE, NULL, 0), NULL) FROM src tablesample (1 rows) PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT COALESCE(1), COALESCE(1, 2), COALESCE(NULL, 2), COALESCE(1, NULL), COALESCE(NULL, NULL, 3), COALESCE(4, NULL, NULL, NULL), COALESCE('1'), COALESCE('1', '2'), COALESCE(NULL, '2'), COALESCE('1', NULL), COALESCE(NULL, NULL, '3'), COALESCE('4', NULL, NULL, NULL), COALESCE(1.0), COALESCE(1.0, 2.0), COALESCE(NULL, 2.0), COALESCE(NULL, 2.0, 3.0), COALESCE(2.0, NULL, 3.0), COALESCE(IF(TRUE, NULL, 0), NULL) FROM src tablesample (1 rows) POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: src Row Limit Per Split: 1 Statistics: Num rows: 500 Data size: 5312 Basic stats: COMPLETE Column stats: COMPLETE Select Operator expressions: 1 (type: int), 1 (type: int), 2 (type: int), 1 (type: int), 3 (type: int), 4 (type: int), '1' (type: string), '1' (type: string), '2' (type: string), '1' (type: string), '3' (type: string), '4' (type: string), 1.0 (type: double), 1.0 (type: double), 2.0 (type: double), 2.0 (type: double), 2.0 (type: double), null (type: int) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13, _col14, _col15, _col16, _col17 Statistics: Num rows: 500 Data size: 287000 Basic stats: COMPLETE Column stats: COMPLETE ListSink PREHOOK: query: SELECT COALESCE(1), COALESCE(1, 2), COALESCE(NULL, 2), COALESCE(1, NULL), COALESCE(NULL, NULL, 3), COALESCE(4, NULL, NULL, NULL), COALESCE('1'), COALESCE('1', '2'), COALESCE(NULL, '2'), COALESCE('1', NULL), COALESCE(NULL, NULL, '3'), COALESCE('4', NULL, NULL, NULL), COALESCE(1.0), COALESCE(1.0, 2.0), COALESCE(NULL, 2.0), COALESCE(NULL, 2.0, 3.0), COALESCE(2.0, NULL, 3.0), COALESCE(IF(TRUE, NULL, 0), NULL) FROM src tablesample (1 rows) PREHOOK: type: QUERY PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: SELECT COALESCE(1), COALESCE(1, 2), COALESCE(NULL, 2), COALESCE(1, NULL), COALESCE(NULL, NULL, 3), COALESCE(4, NULL, NULL, NULL), COALESCE('1'), COALESCE('1', '2'), COALESCE(NULL, '2'), COALESCE('1', NULL), COALESCE(NULL, NULL, '3'), COALESCE('4', NULL, NULL, NULL), COALESCE(1.0), COALESCE(1.0, 2.0), COALESCE(NULL, 2.0), COALESCE(NULL, 2.0, 3.0), COALESCE(2.0, NULL, 3.0), COALESCE(IF(TRUE, NULL, 0), NULL) FROM src tablesample (1 rows) POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### 1 1 2 1 3 4 1 1 2 1 3 4 1.0 1.0 2.0 2.0 2.0 NULL PREHOOK: query: EXPLAIN SELECT COALESCE(src_thrift.lint[1], 999), COALESCE(src_thrift.lintstring[0].mystring, '999'), COALESCE(src_thrift.mstringstring['key_2'], '999') FROM src_thrift PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT COALESCE(src_thrift.lint[1], 999), COALESCE(src_thrift.lintstring[0].mystring, '999'), COALESCE(src_thrift.mstringstring['key_2'], '999') FROM src_thrift POSTHOOK: type: QUERY STAGE DEPENDENCIES: Stage-0 is a root stage STAGE PLANS: Stage: Stage-0 Fetch Operator limit: -1 Processor Tree: TableScan alias: src_thrift Statistics: Num rows: 11 Data size: 3070 Basic stats: COMPLETE Column stats: NONE Select Operator expressions: COALESCE(lint[1],999) (type: int), COALESCE(lintstring[0].mystring,'999') (type: string), COALESCE(mstringstring['key_2'],'999') (type: string) outputColumnNames: _col0, _col1, _col2 Statistics: Num rows: 11 Data size: 3070 Basic stats: COMPLETE Column stats: NONE ListSink PREHOOK: query: SELECT COALESCE(src_thrift.lint[1], 999), COALESCE(src_thrift.lintstring[0].mystring, '999'), COALESCE(src_thrift.mstringstring['key_2'], '999') FROM src_thrift PREHOOK: type: QUERY PREHOOK: Input: default@src_thrift #### A masked pattern was here #### POSTHOOK: query: SELECT COALESCE(src_thrift.lint[1], 999), COALESCE(src_thrift.lintstring[0].mystring, '999'), COALESCE(src_thrift.mstringstring['key_2'], '999') FROM src_thrift POSTHOOK: type: QUERY POSTHOOK: Input: default@src_thrift #### A masked pattern was here #### 0 0 999 2 1 999 4 8 value_2 6 27 999 8 64 999 10 125 999 12 216 999 14 343 999 16 512 999 18 729 999 999 999 999