|
1 | 1 | -- Automatically generated by SQLQueryTestSuite |
2 | | --- Number of queries: 12 |
| 2 | +-- Number of queries: 14 |
3 | 3 |
|
4 | 4 |
|
5 | 5 | -- !query 0 |
@@ -118,3 +118,46 @@ select right(null, -2), right("abcd", -2), right("abcd", 0), right("abcd", 'a') |
118 | 118 | struct<right(NULL, -2):string,right('abcd', -2):string,right('abcd', 0):string,right('abcd', 'a'):string> |
119 | 119 | -- !query 11 output |
120 | 120 | NULL NULL |
| 121 | + |
| 122 | + |
| 123 | +-- !query 12 |
| 124 | +set spark.sql.function.concatBinaryAsString=false |
| 125 | +-- !query 12 schema |
| 126 | +struct<key:string,value:string> |
| 127 | +-- !query 12 output |
| 128 | +spark.sql.function.concatBinaryAsString false |
| 129 | + |
| 130 | + |
| 131 | +-- !query 13 |
| 132 | +EXPLAIN EXTENDED SELECT ((col1 || col2) || (col3 || col4)) col |
| 133 | +FROM ( |
| 134 | + SELECT |
| 135 | + string(id) col1, |
| 136 | + string(id + 1) col2, |
| 137 | + encode(string(id + 2), 'utf-8') col3, |
| 138 | + encode(string(id + 3), 'utf-8') col4 |
| 139 | + FROM range(10) |
| 140 | +) |
| 141 | +-- !query 13 schema |
| 142 | +struct<plan:string> |
| 143 | +-- !query 13 output |
| 144 | +== Parsed Logical Plan == |
| 145 | +'Project [concat(concat('col1, 'col2), concat('col3, 'col4)) AS col#x] |
| 146 | ++- 'SubqueryAlias __auto_generated_subquery_name |
| 147 | + +- 'Project ['string('id) AS col1#x, 'string(('id + 1)) AS col2#x, 'encode('string(('id + 2)), utf-8) AS col3#x, 'encode('string(('id + 3)), utf-8) AS col4#x] |
| 148 | + +- 'UnresolvedTableValuedFunction range, [10] |
| 149 | + |
| 150 | +== Analyzed Logical Plan == |
| 151 | +col: string |
| 152 | +Project [concat(concat(col1#x, col2#x), cast(concat(col3#x, col4#x) as string)) AS col#x] |
| 153 | ++- SubqueryAlias __auto_generated_subquery_name |
| 154 | + +- Project [cast(id#xL as string) AS col1#x, cast((id#xL + cast(1 as bigint)) as string) AS col2#x, encode(cast((id#xL + cast(2 as bigint)) as string), utf-8) AS col3#x, encode(cast((id#xL + cast(3 as bigint)) as string), utf-8) AS col4#x] |
| 155 | + +- Range (0, 10, step=1, splits=None) |
| 156 | + |
| 157 | +== Optimized Logical Plan == |
| 158 | +Project [concat(cast(id#xL as string), cast((id#xL + 1) as string), cast(encode(cast((id#xL + 2) as string), utf-8) as string), cast(encode(cast((id#xL + 3) as string), utf-8) as string)) AS col#x] |
| 159 | ++- Range (0, 10, step=1, splits=None) |
| 160 | + |
| 161 | +== Physical Plan == |
| 162 | +*Project [concat(cast(id#xL as string), cast((id#xL + 1) as string), cast(encode(cast((id#xL + 2) as string), utf-8) as string), cast(encode(cast((id#xL + 3) as string), utf-8) as string)) AS col#x] |
| 163 | ++- *Range (0, 10, step=1, splits=2) |
0 commit comments