fix checkResult, bump to 0.2.4

This commit is contained in:
Davies Liu 2016-06-21 10:24:32 -07:00
parent 61e6bd1897
commit 9286007814
3 changed files with 5 additions and 8 deletions

View File

@ -5,14 +5,14 @@ name := "spark-sql-perf"
organization := "com.databricks"
scalaVersion := "2.10.4"
scalaVersion := "2.10.6"
sparkPackageName := "databricks/spark-sql-perf"
// All Spark Packages need a license
licenses := Seq("Apache-2.0" -> url("http://opensource.org/licenses/Apache-2.0"))
sparkVersion := "v1.6.0-preview"
sparkVersion := "1.6.1"
resolvers += "Apache Preview Repo" at "https://repository.apache.org/content/repositories/orgapachespark-1156/"

View File

@ -617,13 +617,10 @@ abstract class Benchmark(
case ExecutionMode.WriteParquet(location) =>
dataFrame.saveAsParquetFile(s"$location/$name.parquet")
case ExecutionMode.HashResults =>
val columnStr = dataFrame.schema.map(_.name).mkString(",")
// SELECT SUM(HASH(col1, col2, ...)) FROM (benchmark query)
// SELECT SUM(CRC32(CONCAT_WS(",", *))) FROM (benchmark query)
val row =
dataFrame
.selectExpr(s"hash($columnStr) as hashValue")
.groupBy()
.sum("hashValue")
.selectExpr("""SUM(CRC32(CONCAT_WS(",", *)))""")
.head()
result = if (row.isNullAt(0)) None else Some(row.getLong(0))
}

View File

@ -1 +1 @@
version in ThisBuild := "0.2.3"
version in ThisBuild := "0.2.4"