HIVE-18797 : ExprConstNodeDesc's getExprString should put appropriate qualifier with...
[hive.git] / ql / src / test / results / clientpositive / llap / vector_cast_constant.q.out
1 PREHOOK: query: DROP TABLE over1k
2 PREHOOK: type: DROPTABLE
3 POSTHOOK: query: DROP TABLE over1k
4 POSTHOOK: type: DROPTABLE
5 PREHOOK: query: DROP TABLE over1korc
6 PREHOOK: type: DROPTABLE
7 POSTHOOK: query: DROP TABLE over1korc
8 POSTHOOK: type: DROPTABLE
9 PREHOOK: query: CREATE TABLE over1k(t tinyint,
10            si smallint,
11            i int,
12            b bigint,
13            f float,
14            d double,
15            bo boolean,
16            s string,
17            ts timestamp,
18            `dec` decimal(4,2),
19            bin binary)
20 ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
21 STORED AS TEXTFILE
22 PREHOOK: type: CREATETABLE
23 PREHOOK: Output: database:default
24 PREHOOK: Output: default@over1k
25 POSTHOOK: query: CREATE TABLE over1k(t tinyint,
26            si smallint,
27            i int,
28            b bigint,
29            f float,
30            d double,
31            bo boolean,
32            s string,
33            ts timestamp,
34            `dec` decimal(4,2),
35            bin binary)
36 ROW FORMAT DELIMITED FIELDS TERMINATED BY '|'
37 STORED AS TEXTFILE
38 POSTHOOK: type: CREATETABLE
39 POSTHOOK: Output: database:default
40 POSTHOOK: Output: default@over1k
41 PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/over1k' OVERWRITE INTO TABLE over1k
42 PREHOOK: type: LOAD
43 #### A masked pattern was here ####
44 PREHOOK: Output: default@over1k
45 POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/over1k' OVERWRITE INTO TABLE over1k
46 POSTHOOK: type: LOAD
47 #### A masked pattern was here ####
48 POSTHOOK: Output: default@over1k
49 PREHOOK: query: CREATE TABLE over1korc(t tinyint,
50            si smallint,
51            i int,
52            b bigint,
53            f float,
54            d double,
55            bo boolean,
56            s string,
57            ts timestamp,
58            `dec` decimal(4,2),
59            bin binary)
60 STORED AS ORC
61 PREHOOK: type: CREATETABLE
62 PREHOOK: Output: database:default
63 PREHOOK: Output: default@over1korc
64 POSTHOOK: query: CREATE TABLE over1korc(t tinyint,
65            si smallint,
66            i int,
67            b bigint,
68            f float,
69            d double,
70            bo boolean,
71            s string,
72            ts timestamp,
73            `dec` decimal(4,2),
74            bin binary)
75 STORED AS ORC
76 POSTHOOK: type: CREATETABLE
77 POSTHOOK: Output: database:default
78 POSTHOOK: Output: default@over1korc
79 PREHOOK: query: INSERT INTO TABLE over1korc SELECT * FROM over1k
80 PREHOOK: type: QUERY
81 PREHOOK: Input: default@over1k
82 PREHOOK: Output: default@over1korc
83 POSTHOOK: query: INSERT INTO TABLE over1korc SELECT * FROM over1k
84 POSTHOOK: type: QUERY
85 POSTHOOK: Input: default@over1k
86 POSTHOOK: Output: default@over1korc
87 POSTHOOK: Lineage: over1korc.b SIMPLE [(over1k)over1k.FieldSchema(name:b, type:bigint, comment:null), ]
88 POSTHOOK: Lineage: over1korc.bin SIMPLE [(over1k)over1k.FieldSchema(name:bin, type:binary, comment:null), ]
89 POSTHOOK: Lineage: over1korc.bo SIMPLE [(over1k)over1k.FieldSchema(name:bo, type:boolean, comment:null), ]
90 POSTHOOK: Lineage: over1korc.d SIMPLE [(over1k)over1k.FieldSchema(name:d, type:double, comment:null), ]
91 POSTHOOK: Lineage: over1korc.dec SIMPLE [(over1k)over1k.FieldSchema(name:dec, type:decimal(4,2), comment:null), ]
92 POSTHOOK: Lineage: over1korc.f SIMPLE [(over1k)over1k.FieldSchema(name:f, type:float, comment:null), ]
93 POSTHOOK: Lineage: over1korc.i SIMPLE [(over1k)over1k.FieldSchema(name:i, type:int, comment:null), ]
94 POSTHOOK: Lineage: over1korc.s SIMPLE [(over1k)over1k.FieldSchema(name:s, type:string, comment:null), ]
95 POSTHOOK: Lineage: over1korc.si SIMPLE [(over1k)over1k.FieldSchema(name:si, type:smallint, comment:null), ]
96 POSTHOOK: Lineage: over1korc.t SIMPLE [(over1k)over1k.FieldSchema(name:t, type:tinyint, comment:null), ]
97 POSTHOOK: Lineage: over1korc.ts SIMPLE [(over1k)over1k.FieldSchema(name:ts, type:timestamp, comment:null), ]
98 PREHOOK: query: EXPLAIN VECTORIZATION EXPRESSION SELECT 
99   i,
100   AVG(CAST(50 AS INT)) AS `avg_int_ok`,
101   AVG(CAST(50 AS DOUBLE)) AS `avg_double_ok`,
102   AVG(CAST(50 AS DECIMAL)) AS `avg_decimal_ok`
103   FROM over1korc GROUP BY i ORDER BY i LIMIT 10
104 PREHOOK: type: QUERY
105 POSTHOOK: query: EXPLAIN VECTORIZATION EXPRESSION SELECT 
106   i,
107   AVG(CAST(50 AS INT)) AS `avg_int_ok`,
108   AVG(CAST(50 AS DOUBLE)) AS `avg_double_ok`,
109   AVG(CAST(50 AS DECIMAL)) AS `avg_decimal_ok`
110   FROM over1korc GROUP BY i ORDER BY i LIMIT 10
111 POSTHOOK: type: QUERY
112 PLAN VECTORIZATION:
113   enabled: true
114   enabledConditionsMet: [hive.vectorized.execution.enabled IS true]
115
116 STAGE DEPENDENCIES:
117   Stage-1 is a root stage
118   Stage-0 depends on stages: Stage-1
119
120 STAGE PLANS:
121   Stage: Stage-1
122     Tez
123 #### A masked pattern was here ####
124       Edges:
125         Reducer 2 <- Map 1 (SIMPLE_EDGE)
126         Reducer 3 <- Reducer 2 (SIMPLE_EDGE)
127 #### A masked pattern was here ####
128       Vertices:
129         Map 1 
130             Map Operator Tree:
131                 TableScan
132                   alias: over1korc
133                   Statistics: Num rows: 1049 Data size: 4196 Basic stats: COMPLETE Column stats: COMPLETE
134                   TableScan Vectorization:
135                       native: true
136                   Select Operator
137                     expressions: i (type: int)
138                     outputColumnNames: _col0
139                     Select Vectorization:
140                         className: VectorSelectOperator
141                         native: true
142                         projectedOutputColumnNums: [2]
143                     Statistics: Num rows: 1049 Data size: 4196 Basic stats: COMPLETE Column stats: COMPLETE
144                     Group By Operator
145                       aggregations: avg(50), avg(50.0D), avg(50)
146                       Group By Vectorization:
147                           aggregators: VectorUDAFAvgLong(ConstantVectorExpression(val 50) -> 12:int) -> struct<count:bigint,sum:double,input:int>, VectorUDAFAvgDouble(ConstantVectorExpression(val 50.0) -> 13:double) -> struct<count:bigint,sum:double,input:double>, VectorUDAFAvgDecimal(ConstantVectorExpression(val 50) -> 14:decimal(10,0)) -> struct<count:bigint,sum:decimal(20,0),input:decimal(10,0)>
148                           className: VectorGroupByOperator
149                           groupByMode: HASH
150                           keyExpressions: col 2:int
151                           native: false
152                           vectorProcessingMode: HASH
153                           projectedOutputColumnNums: [0, 1, 2]
154                       keys: _col0 (type: int)
155                       mode: hash
156                       outputColumnNames: _col0, _col1, _col2, _col3
157                       Statistics: Num rows: 256 Data size: 114688 Basic stats: COMPLETE Column stats: COMPLETE
158                       Reduce Output Operator
159                         key expressions: _col0 (type: int)
160                         sort order: +
161                         Map-reduce partition columns: _col0 (type: int)
162                         Reduce Sink Vectorization:
163                             className: VectorReduceSinkLongOperator
164                             native: true
165                             nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
166                         Statistics: Num rows: 256 Data size: 114688 Basic stats: COMPLETE Column stats: COMPLETE
167                         TopN Hash Memory Usage: 0.1
168                         value expressions: _col1 (type: struct<count:bigint,sum:double,input:int>), _col2 (type: struct<count:bigint,sum:double,input:double>), _col3 (type: struct<count:bigint,sum:decimal(12,0),input:decimal(10,0)>)
169             Execution mode: vectorized, llap
170             LLAP IO: all inputs
171             Map Vectorization:
172                 enabled: true
173                 enabledConditionsMet: hive.vectorized.use.vectorized.input.format IS true
174                 inputFormatFeatureSupport: []
175                 featureSupportInUse: []
176                 inputFileFormats: org.apache.hadoop.hive.ql.io.orc.OrcInputFormat
177                 allNative: false
178                 usesVectorUDFAdaptor: false
179                 vectorized: true
180         Reducer 2 
181             Execution mode: vectorized, llap
182             Reduce Vectorization:
183                 enabled: true
184                 enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true
185                 allNative: false
186                 usesVectorUDFAdaptor: false
187                 vectorized: true
188             Reduce Operator Tree:
189               Group By Operator
190                 aggregations: avg(VALUE._col0), avg(VALUE._col1), avg(VALUE._col2)
191                 Group By Vectorization:
192                     aggregators: VectorUDAFAvgFinal(col 1:struct<count:bigint,sum:double,input:int>) -> double, VectorUDAFAvgFinal(col 2:struct<count:bigint,sum:double,input:double>) -> double, VectorUDAFAvgDecimalFinal(col 3:struct<count:bigint,sum:decimal(12,0),input:decimal(10,0)>) -> decimal(14,4)
193                     className: VectorGroupByOperator
194                     groupByMode: MERGEPARTIAL
195                     keyExpressions: col 0:int
196                     native: false
197                     vectorProcessingMode: MERGE_PARTIAL
198                     projectedOutputColumnNums: [0, 1, 2]
199                 keys: KEY._col0 (type: int)
200                 mode: mergepartial
201                 outputColumnNames: _col0, _col1, _col2, _col3
202                 Statistics: Num rows: 256 Data size: 33792 Basic stats: COMPLETE Column stats: COMPLETE
203                 Reduce Output Operator
204                   key expressions: _col0 (type: int)
205                   sort order: +
206                   Reduce Sink Vectorization:
207                       className: VectorReduceSinkObjectHashOperator
208                       native: true
209                       nativeConditionsMet: hive.vectorized.execution.reducesink.new.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true, No PTF TopN IS true, No DISTINCT columns IS true, BinarySortableSerDe for keys IS true, LazyBinarySerDe for values IS true
210                   Statistics: Num rows: 256 Data size: 33792 Basic stats: COMPLETE Column stats: COMPLETE
211                   TopN Hash Memory Usage: 0.1
212                   value expressions: _col1 (type: double), _col2 (type: double), _col3 (type: decimal(14,4))
213         Reducer 3 
214             Execution mode: vectorized, llap
215             Reduce Vectorization:
216                 enabled: true
217                 enableConditionsMet: hive.vectorized.execution.reduce.enabled IS true, hive.execution.engine tez IN [tez, spark] IS true
218                 allNative: false
219                 usesVectorUDFAdaptor: false
220                 vectorized: true
221             Reduce Operator Tree:
222               Select Operator
223                 expressions: KEY.reducesinkkey0 (type: int), VALUE._col0 (type: double), VALUE._col1 (type: double), VALUE._col2 (type: decimal(14,4))
224                 outputColumnNames: _col0, _col1, _col2, _col3
225                 Select Vectorization:
226                     className: VectorSelectOperator
227                     native: true
228                     projectedOutputColumnNums: [0, 1, 2, 3]
229                 Statistics: Num rows: 256 Data size: 33792 Basic stats: COMPLETE Column stats: COMPLETE
230                 Limit
231                   Number of rows: 10
232                   Limit Vectorization:
233                       className: VectorLimitOperator
234                       native: true
235                   Statistics: Num rows: 10 Data size: 1320 Basic stats: COMPLETE Column stats: COMPLETE
236                   File Output Operator
237                     compressed: false
238                     File Sink Vectorization:
239                         className: VectorFileSinkOperator
240                         native: false
241                     Statistics: Num rows: 10 Data size: 1320 Basic stats: COMPLETE Column stats: COMPLETE
242                     table:
243                         input format: org.apache.hadoop.mapred.SequenceFileInputFormat
244                         output format: org.apache.hadoop.hive.ql.io.HiveSequenceFileOutputFormat
245                         serde: org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
246
247   Stage: Stage-0
248     Fetch Operator
249       limit: 10
250       Processor Tree:
251         ListSink
252
253 PREHOOK: query: SELECT 
254   i,
255   AVG(CAST(50 AS INT)) AS `avg_int_ok`,
256   AVG(CAST(50 AS DOUBLE)) AS `avg_double_ok`,
257   AVG(CAST(50 AS DECIMAL)) AS `avg_decimal_ok`
258   FROM over1korc GROUP BY i ORDER BY i LIMIT 10
259 PREHOOK: type: QUERY
260 PREHOOK: Input: default@over1korc
261 #### A masked pattern was here ####
262 POSTHOOK: query: SELECT 
263   i,
264   AVG(CAST(50 AS INT)) AS `avg_int_ok`,
265   AVG(CAST(50 AS DOUBLE)) AS `avg_double_ok`,
266   AVG(CAST(50 AS DECIMAL)) AS `avg_decimal_ok`
267   FROM over1korc GROUP BY i ORDER BY i LIMIT 10
268 POSTHOOK: type: QUERY
269 POSTHOOK: Input: default@over1korc
270 #### A masked pattern was here ####
271 65536   50.0    50.0    50.0000
272 65537   50.0    50.0    50.0000
273 65538   50.0    50.0    50.0000
274 65539   50.0    50.0    50.0000
275 65540   50.0    50.0    50.0000
276 65541   50.0    50.0    50.0000
277 65542   50.0    50.0    50.0000
278 65543   50.0    50.0    50.0000
279 65544   50.0    50.0    50.0000
280 65545   50.0    50.0    50.0000