diff --git a/dev/.rat-excludes b/dev/.rat-excludes index dee8098ba29a3..0c866717a3f43 100644 --- a/dev/.rat-excludes +++ b/dev/.rat-excludes @@ -99,5 +99,4 @@ spark-deps-.* .*tsv org.apache.spark.scheduler.ExternalClusterManager .*\.sql -.*\.sql\.out .Rbuildignore diff --git a/sql/core/src/test/resources/sql-tests/results/number-format.sql.out b/sql/core/src/test/resources/sql-tests/results/number-format.sql.out index 8757119f8f6c3..3c3fcbd91b91a 100644 --- a/sql/core/src/test/resources/sql-tests/results/number-format.sql.out +++ b/sql/core/src/test/resources/sql-tests/results/number-format.sql.out @@ -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 diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala index 3238a97c7dd5e..56cf6ea4bf2f1 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala @@ -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) {