PREHOOK: query: DESCRIBE FUNCTION greatest PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION greatest POSTHOOK: type: DESCFUNCTION greatest(v1, v2, ...) - Returns the greatest value in a list of values PREHOOK: query: DESCRIBE FUNCTION EXTENDED greatest PREHOOK: type: DESCFUNCTION POSTHOOK: query: DESCRIBE FUNCTION EXTENDED greatest POSTHOOK: type: DESCFUNCTION greatest(v1, v2, ...) - Returns the greatest value in a list of values Example: > SELECT greatest(2, 3, 1) FROM src LIMIT 1; 3 PREHOOK: query: EXPLAIN SELECT GREATEST('a', 'b', 'c'), GREATEST('C', 'a', 'B'), GREATEST('AAA', 'AaA', 'AAa'), GREATEST('A', 'AA', 'AAA'), GREATEST('11', '13', '12'), GREATEST('11', '2', '12'), GREATEST('01', '03', '02'), GREATEST('01', '1', '02'), GREATEST(null, 'b', 'c' ), GREATEST('a', null, 'c'), GREATEST('a', 'b', null ), GREATEST('a', null, null), GREATEST(null, 'b', null), GREATEST(cast(null as string), null, null) FROM src tablesample (1 rows) PREHOOK: type: QUERY POSTHOOK: query: EXPLAIN SELECT GREATEST('a', 'b', 'c'), GREATEST('C', 'a', 'B'), GREATEST('AAA', 'AaA', 'AAa'), GREATEST('A', 'AA', 'AAA'), GREATEST('11', '13', '12'), GREATEST('11', '2', '12'), GREATEST('01', '03', '02'), GREATEST('01', '1', '02'), GREATEST(null, 'b', 'c' ), GREATEST('a', null, 'c'), GREATEST('a', 'b', null ), GREATEST('a', null, null), GREATEST(null, 'b', null), GREATEST(cast(null as string), null, 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: 'c' (type: string), 'a' (type: string), 'AaA' (type: string), 'AAA' (type: string), '13' (type: string), '2' (type: string), '03' (type: string), '1' (type: string), 'c' (type: string), 'c' (type: string), 'b' (type: string), 'a' (type: string), 'b' (type: string), null (type: string) outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11, _col12, _col13 Statistics: Num rows: 500 Data size: 555500 Basic stats: COMPLETE Column stats: COMPLETE ListSink PREHOOK: query: SELECT GREATEST('a', 'b', 'c'), GREATEST('C', 'a', 'B'), GREATEST('AAA', 'AaA', 'AAa'), GREATEST('A', 'AA', 'AAA'), GREATEST('11', '13', '12'), GREATEST('11', '2', '12'), GREATEST('01', '03', '02'), GREATEST('01', '1', '02'), GREATEST(null, 'b', 'c' ), GREATEST('a', null, 'c'), GREATEST('a', 'b', null ), GREATEST('a', null, null), GREATEST(null, 'b', null), GREATEST(cast(null as string), null, null) FROM src tablesample (1 rows) PREHOOK: type: QUERY PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: SELECT GREATEST('a', 'b', 'c'), GREATEST('C', 'a', 'B'), GREATEST('AAA', 'AaA', 'AAa'), GREATEST('A', 'AA', 'AAA'), GREATEST('11', '13', '12'), GREATEST('11', '2', '12'), GREATEST('01', '03', '02'), GREATEST('01', '1', '02'), GREATEST(null, 'b', 'c' ), GREATEST('a', null, 'c'), GREATEST('a', 'b', null ), GREATEST('a', null, null), GREATEST(null, 'b', null), GREATEST(cast(null as string), null, null) FROM src tablesample (1 rows) POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### c a AaA AAA 13 2 03 1 c c b a b NULL PREHOOK: query: SELECT GREATEST(11, 13, 12), GREATEST(1, 13, 2), GREATEST(-11, -13, -12), GREATEST(1, -13, 2), GREATEST(null, 1, 2), GREATEST(1, null, 2), GREATEST(1, 2, null), GREATEST(cast(null as int), null, null) FROM src tablesample (1 rows) PREHOOK: type: QUERY PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: SELECT GREATEST(11, 13, 12), GREATEST(1, 13, 2), GREATEST(-11, -13, -12), GREATEST(1, -13, 2), GREATEST(null, 1, 2), GREATEST(1, null, 2), GREATEST(1, 2, null), GREATEST(cast(null as int), null, null) FROM src tablesample (1 rows) POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### 13 13 -11 2 2 2 2 NULL PREHOOK: query: SELECT GREATEST(11.4, 13.5, 12.2), GREATEST(1.0, 13.2, 2.0), GREATEST(-11.4, -13.1, -12.2), GREATEST(1.0, -13.3, 2.2), GREATEST(null, 1.1, 2.2), GREATEST(1.1, null, 2.2), GREATEST(1.1, 2.2, null), GREATEST(cast(null as double), null, null) FROM src tablesample (1 rows) PREHOOK: type: QUERY PREHOOK: Input: default@src #### A masked pattern was here #### POSTHOOK: query: SELECT GREATEST(11.4, 13.5, 12.2), GREATEST(1.0, 13.2, 2.0), GREATEST(-11.4, -13.1, -12.2), GREATEST(1.0, -13.3, 2.2), GREATEST(null, 1.1, 2.2), GREATEST(1.1, null, 2.2), GREATEST(1.1, 2.2, null), GREATEST(cast(null as double), null, null) FROM src tablesample (1 rows) POSTHOOK: type: QUERY POSTHOOK: Input: default@src #### A masked pattern was here #### 13.5 13.2 -11.4 2.2 2.2 2.2 2.2 NULL