Skip to content

Commit 0359756

Browse files
committed
code review
1 parent 34b6704 commit 0359756

File tree

3 files changed

+10
-27
lines changed

3 files changed

+10
-27
lines changed

dev/.rat-excludes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,4 @@ spark-deps-.*
9999
.*tsv
100100
org.apache.spark.scheduler.ExternalClusterManager
101101
.*\.sql
102-
.*\.sql\.out
103102
.Rbuildignore

sql/core/src/test/resources/sql-tests/results/number-format.sql.out

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,30 @@
55
-- !query 0
66
select 1, -1
77
-- !query 0 schema
8-
int, int
8+
struct<1:int,(-1):int>
99
-- !query 0 output
10-
+---+----+
11-
| 1|(-1)|
12-
+---+----+
13-
| 1| -1|
14-
+---+----+
10+
1 -1
1511

1612

1713
-- !query 1
1814
select 2147483648, -2147483649
1915
-- !query 1 schema
20-
bigint, bigint
16+
struct<2147483648:bigint,(-2147483649):bigint>
2117
-- !query 1 output
22-
+----------+-------------+
23-
|2147483648|(-2147483649)|
24-
+----------+-------------+
25-
|2147483648| -2147483649|
26-
+----------+-------------+
18+
2147483648 -2147483649
2719

2820

2921
-- !query 2
3022
select 9223372036854775808, -9223372036854775809
3123
-- !query 2 schema
32-
decimal(19,0), decimal(19,0)
24+
struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
3325
-- !query 2 output
34-
+-------------------+----------------------+
35-
|9223372036854775808|(-9223372036854775809)|
36-
+-------------------+----------------------+
37-
|9223372036854775808| -9223372036854775809|
38-
+-------------------+----------------------+
26+
9223372036854775808 -9223372036854775809
3927

4028

4129
-- !query 3
4230
select 0.3, -0.8, .5, -.18
4331
-- !query 3 schema
44-
decimal(1,1), decimal(1,1), decimal(1,1), decimal(2,2)
32+
struct<0.3:decimal(1,1),(-0.8):decimal(1,1),0.5:decimal(1,1),(-0.18):decimal(2,2)>
4533
-- !query 3 output
46-
+---+------+---+-------+
47-
|0.3|(-0.8)|0.5|(-0.18)|
48-
+---+------+---+-------+
49-
|0.3| -0.8|0.5| -0.18|
50-
+---+------+---+-------+
34+
0.3 -0.8 0.5 -0.18

sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class SQLQueryTestSuite extends QueryTest with SharedSQLContext {
124124
// We might need to do some query canonicalization in the future.
125125
QueryOutput(
126126
sql = sql,
127-
schema = df.schema.map(_.dataType.simpleString).mkString(", "),
128-
output = df.showString(_numRows = 10000, truncate = 10000).trim)
127+
schema = df.schema.catalogString,
128+
output = df.queryExecution.hiveResultString().mkString("\n"))
129129
}
130130

131131
if (regenerateGoldenFiles) {

0 commit comments

Comments
 (0)