Skip to content

Commit f913a2c

Browse files
committed
[SPARK-51871] Improve SQLTests to check column names
### What changes were proposed in this pull request? This PR aims to improve `SQLTests` to check column names. ### Why are the changes needed? To improve the test coverage. ### Does this PR introduce _any_ user-facing change? No, this is a test-only improvement. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #85 from dongjoon-hyun/SPARK-51871. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 49bb86c commit f913a2c

24 files changed

+141
-62
lines changed

.github/workflows/build_and_test.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ jobs:
9696
run: |
9797
curl -LO https://dist.apache.org/repos/dist/dev/spark/v4.0.0-rc4-bin/spark-4.0.0-bin-hadoop3.tgz
9898
tar xvfz spark-4.0.0-bin-hadoop3.tgz
99-
cd spark-4.0.0-bin-hadoop3/sbin
99+
mv spark-4.0.0-bin-hadoop3 /tmp/spark
100+
cd /tmp/spark/sbin
100101
./start-connect-server.sh
101-
cd ../..
102+
cd -
102103
swift test --no-parallel
103104
104105
integration-test-token:
@@ -114,9 +115,10 @@ jobs:
114115
run: |
115116
curl -LO https://dist.apache.org/repos/dist/dev/spark/v4.0.0-rc4-bin/spark-4.0.0-bin-hadoop3.tgz
116117
tar xvfz spark-4.0.0-bin-hadoop3.tgz
117-
cd spark-4.0.0-bin-hadoop3/sbin
118+
mv spark-4.0.0-bin-hadoop3 /tmp/spark
119+
cd /tmp/spark/sbin
118120
./start-connect-server.sh
119-
cd ../..
121+
cd -
120122
swift test --no-parallel
121123
122124
integration-test-mac-spark3:
@@ -135,7 +137,8 @@ jobs:
135137
run: |
136138
curl -LO https://downloads.apache.org/spark/spark-3.5.5/spark-3.5.5-bin-hadoop3.tgz
137139
tar xvfz spark-3.5.5-bin-hadoop3.tgz
138-
cd spark-3.5.5-bin-hadoop3/sbin
140+
mv spark-3.5.5-bin-hadoop3 /tmp/spark
141+
cd /tmp/spark/sbin
139142
./start-connect-server.sh --packages org.apache.spark:spark-connect_2.12:3.5.5
140-
cd ../..
143+
cd -
141144
swift test --no-parallel
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
[abc]
1+
+----------+
2+
| abc|
3+
+----------+
4+
|[61 62 63]|
5+
+----------+
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
1+
++
2+
||
3+
++
4+
++
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
1+
++
2+
||
3+
++
4+
++
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
1+
++
2+
||
3+
++
4+
++
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
1+
++
2+
||
3+
++
4+
++
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
[2025-03-15 00:00:00 +0000]
1+
+-----------------+
2+
|DATE '2025-03-15'|
3+
+-----------------+
4+
| 2025-03-15|
5+
+-----------------+
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
[Catalog Name,spark_catalog]
2-
[Namespace Name,default]
3-
[Comment,default database]
4-
[Location,*]
5-
[Owner,*]
1+
+--------------+----------------------------------------+
2+
| info_name| info_value|
3+
+--------------+----------------------------------------+
4+
| Catalog Name| spark_catalog|
5+
|Namespace Name| default|
6+
| Comment| default database|
7+
| Location|*|
8+
| Owner| *|
9+
+--------------+----------------------------------------+
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
[Function: abs]
2-
[Class: org.apache.spark.sql.catalyst.expressions.Abs]
3-
[Usage: abs(expr) - Returns the absolute value of the numeric or interval value.]
1+
+-------------------------------------------------------------------------------+
2+
| function_desc|
3+
+-------------------------------------------------------------------------------+
4+
| Function: abs|
5+
| Class: org.apache.spark.sql.catalyst.expressions.Abs|
6+
|Usage: abs(expr) - Returns the absolute value of the numeric or interval value.|
7+
+-------------------------------------------------------------------------------+
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
[id,int,null]
2-
[name,string,null]
3-
[salary,double,null]
1+
+--------+---------+-------+
2+
|col_name|data_type|comment|
3+
+--------+---------+-------+
4+
| id| int| NULL|
5+
| name| string| NULL|
6+
| salary| double| NULL|
7+
+--------+---------+-------+

0 commit comments

Comments
 (0)