Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
  • Loading branch information
petermaxlee committed Aug 9, 2016
1 parent 34b6704 commit 0359756
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
1 change: 0 additions & 1 deletion dev/.rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ spark-deps-.*
.*tsv
org.apache.spark.scheduler.ExternalClusterManager
.*\.sql
.*\.sql\.out
.Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,30 @@
-- !query 0
select 1, -1
-- !query 0 schema
int, int
struct<1:int,(-1):int>
-- !query 0 output
+---+----+
| 1|(-1)|
+---+----+
| 1| -1|
+---+----+
1 -1


-- !query 1
select 2147483648, -2147483649
-- !query 1 schema
bigint, bigint
struct<2147483648:bigint,(-2147483649):bigint>
-- !query 1 output
+----------+-------------+
|2147483648|(-2147483649)|
+----------+-------------+
|2147483648| -2147483649|
+----------+-------------+
2147483648 -2147483649


-- !query 2
select 9223372036854775808, -9223372036854775809
-- !query 2 schema
decimal(19,0), decimal(19,0)
struct<9223372036854775808:decimal(19,0),(-9223372036854775809):decimal(19,0)>
-- !query 2 output
+-------------------+----------------------+
|9223372036854775808|(-9223372036854775809)|
+-------------------+----------------------+
|9223372036854775808| -9223372036854775809|
+-------------------+----------------------+
9223372036854775808 -9223372036854775809


-- !query 3
select 0.3, -0.8, .5, -.18
-- !query 3 schema
decimal(1,1), decimal(1,1), decimal(1,1), decimal(2,2)
struct<0.3:decimal(1,1),(-0.8):decimal(1,1),0.5:decimal(1,1),(-0.18):decimal(2,2)>
-- !query 3 output
+---+------+---+-------+
|0.3|(-0.8)|0.5|(-0.18)|
+---+------+---+-------+
|0.3| -0.8|0.5| -0.18|
+---+------+---+-------+
0.3 -0.8 0.5 -0.18
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ class SQLQueryTestSuite extends QueryTest with SharedSQLContext {
// We might need to do some query canonicalization in the future.
QueryOutput(
sql = sql,
schema = df.schema.map(_.dataType.simpleString).mkString(", "),
output = df.showString(_numRows = 10000, truncate = 10000).trim)
schema = df.schema.catalogString,
output = df.queryExecution.hiveResultString().mkString("\n"))
}

if (regenerateGoldenFiles) {
Expand Down

0 comments on commit 0359756

Please sign in to comment.