Skip to content

Commit 1ab93ea

Browse files
committed
[SPARK-51976] Add array, map, timestamp, posexplode test queries
### What changes were proposed in this pull request? This PR aims to add `array`, `map`, `timestamp`, `posexplode` test queries and answer files. ### Why are the changes needed? To have a test coverage. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #101 from dongjoon-hyun/SPARK-51976. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 0bc78b4 commit 1ab93ea

File tree

8 files changed

+25
-0
lines changed

8 files changed

+25
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT array(1, 2, 3)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+--------------+
2+
|array(1, 2, 3)|
3+
+--------------+
4+
| [1, 2, 3]|
5+
+--------------+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT map(1.0, '2', 3.0, '4')
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+--------------------+
2+
| map(1.0, 2, 3.0, 4)|
3+
+--------------------+
4+
|{1.0 -> 2, 3.0 -> 4}|
5+
+--------------------+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT posexplode(array(10,20))
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
+---+---+
2+
|pos|col|
3+
+---+---+
4+
| 0| 10|
5+
| 1| 20|
6+
+---+---+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
SELECT TIMESTAMP '2025-05-01 16:23:40.945304'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+--------------------------------------+
2+
|TIMESTAMP '2025-05-01 16:23:40.945304'|
3+
+--------------------------------------+
4+
| 2025-05-01 16:23:40.945304|
5+
+--------------------------------------+

0 commit comments

Comments
 (0)