|
1 | 1 | -- Automatically generated by SQLQueryTestSuite |
2 | | --- Number of queries: 20 |
| 2 | +-- Number of queries: 18 |
3 | 3 |
|
4 | 4 |
|
5 | 5 | -- !query 0 |
@@ -123,75 +123,59 @@ struct<date_trunc_week:string,week_trunc:timestamp> |
123 | 123 |
|
124 | 124 |
|
125 | 125 | -- !query 13 |
126 | | -set spark.sql.parser.ansi.enabled=false |
127 | | --- !query 13 schema |
128 | | -struct<key:string,value:string> |
129 | | --- !query 13 output |
130 | | -spark.sql.parser.ansi.enabled false |
131 | | - |
132 | | - |
133 | | --- !query 14 |
134 | 126 | SELECT '' AS `54`, d1 as `timestamp`, |
135 | | - date_part( 'year', d1) AS year, date_part( 'month', d1) AS month, |
136 | | - date_part( 'day', d1) AS day, date_part( 'hour', d1) AS hour, |
137 | | - date_part( 'minute', d1) AS minute, date_part( 'second', d1) AS second |
| 127 | + date_part( 'year', d1) AS `year`, date_part( 'month', d1) AS `month`, |
| 128 | + date_part( 'day', d1) AS `day`, date_part( 'hour', d1) AS `hour`, |
| 129 | + date_part( 'minute', d1) AS `minute`, date_part( 'second', d1) AS `second` |
138 | 130 | FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01' |
139 | | --- !query 14 schema |
| 131 | +-- !query 13 schema |
140 | 132 | struct<54:string,timestamp:timestamp,year:int,month:int,day:int,hour:int,minute:int,second:int> |
141 | | --- !query 14 output |
| 133 | +-- !query 13 output |
142 | 134 | 1997-01-02 00:00:00 1997 1 2 0 0 0 |
143 | 135 | 1997-01-02 03:04:05 1997 1 2 3 4 5 |
144 | 136 | 1997-02-10 17:32:01 1997 2 10 17 32 1 |
145 | 137 | 2001-09-22 18:19:20 2001 9 22 18 19 20 |
146 | 138 |
|
147 | 139 |
|
148 | | --- !query 15 |
149 | | -set spark.sql.parser.ansi.enabled=true |
150 | | --- !query 15 schema |
151 | | -struct<key:string,value:string> |
152 | | --- !query 15 output |
153 | | -spark.sql.parser.ansi.enabled true |
154 | | - |
155 | | - |
156 | | --- !query 16 |
| 140 | +-- !query 14 |
157 | 141 | SELECT '' AS `54`, d1 as `timestamp`, |
158 | 142 | date_part( 'quarter', d1) AS quarter, date_part( 'msec', d1) AS msec, |
159 | 143 | date_part( 'usec', d1) AS usec |
160 | 144 | FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01' |
161 | | --- !query 16 schema |
| 145 | +-- !query 14 schema |
162 | 146 | struct<54:string,timestamp:timestamp,quarter:int,msec:decimal(8,3),usec:int> |
163 | | --- !query 16 output |
| 147 | +-- !query 14 output |
164 | 148 | 1997-01-02 00:00:00 1 0 0 |
165 | 149 | 1997-01-02 03:04:05 1 5000 5000000 |
166 | 150 | 1997-02-10 17:32:01 1 1000 1000000 |
167 | 151 | 2001-09-22 18:19:20 3 20000 20000000 |
168 | 152 |
|
169 | 153 |
|
170 | | --- !query 17 |
| 154 | +-- !query 15 |
171 | 155 | SELECT '' AS `54`, d1 as `timestamp`, |
172 | 156 | date_part( 'isoyear', d1) AS isoyear, date_part( 'week', d1) AS week, |
173 | 157 | date_part( 'dow', d1) AS dow |
174 | 158 | FROM TIMESTAMP_TBL WHERE d1 BETWEEN '1902-01-01' AND '2038-01-01' |
175 | | --- !query 17 schema |
| 159 | +-- !query 15 schema |
176 | 160 | struct<54:string,timestamp:timestamp,isoyear:int,week:int,dow:int> |
177 | | --- !query 17 output |
| 161 | +-- !query 15 output |
178 | 162 | 1997-01-02 00:00:00 1997 1 4 |
179 | 163 | 1997-01-02 03:04:05 1997 1 4 |
180 | 164 | 1997-02-10 17:32:01 1997 7 1 |
181 | 165 | 2001-09-22 18:19:20 2001 38 6 |
182 | 166 |
|
183 | 167 |
|
184 | | --- !query 18 |
| 168 | +-- !query 16 |
185 | 169 | SELECT make_timestamp(2014,12,28,6,30,45.887) |
186 | | --- !query 18 schema |
| 170 | +-- !query 16 schema |
187 | 171 | struct<make_timestamp(2014, 12, 28, 6, 30, CAST(45.887 AS DECIMAL(8,6))):timestamp> |
188 | | --- !query 18 output |
| 172 | +-- !query 16 output |
189 | 173 | 2014-12-28 06:30:45.887 |
190 | 174 |
|
191 | 175 |
|
192 | | --- !query 19 |
| 176 | +-- !query 17 |
193 | 177 | DROP TABLE TIMESTAMP_TBL |
194 | | --- !query 19 schema |
| 178 | +-- !query 17 schema |
195 | 179 | struct<> |
196 | | --- !query 19 output |
| 180 | +-- !query 17 output |
197 | 181 |
|
0 commit comments