Skip to content

Commit

Permalink
TPCH Benchmark fixes (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik authored and imback82 committed Apr 24, 2019
1 parent 43775f1 commit 8719e44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions benchmark/csharp/Tpch/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ private static void Main(string[] args)
Console.WriteLine("\t<spark-submit> --master local");
Console.WriteLine("\t\t--class org.apache.spark.deploy.DotnetRunner <path-to-microsoft-spark-jar>");
Console.WriteLine("\t\tTpch.exe <tpch_data_root_path> <query_number> <num_iterations> <true for SQL | false for functional>");

return;
}

var tpchRoot = args[0];
Expand Down
4 changes: 3 additions & 1 deletion benchmark/scala/src/main/scala/com/microsoft/tpch/App.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ object App {
def main(args: Array[String]) {
if (args.length != 4) {
println("Usage:")
println("\t<spark-submit> --master local --class com.microsoft.tpch.App microsoft-spark-examples-<version>.jar")
println("\t<spark-submit> --master local --class com.microsoft.tpch.App microsoft-spark-benchmark-<version>.jar")
println("\t\t<tpch_data_root_path> <query_number> <num_iterations> <true for SQL | false for functional>")

return
}

val tpchRoot = args(0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ class TpchFunctionalQueries(spark: SparkSession, tpchRoot: String)

customer.join(order, $"c_custkey" === order("o_custkey")
&& !special(order("o_comment")), "left_outer")
.groupBy($"o_custkey")
.groupBy($"c_custkey")
.agg(count($"o_orderkey").as("c_count"))
.groupBy($"c_count")
.agg(count($"o_custkey").as("custdist"))
.agg(count($"*").as("custdist"))
.sort($"custdist".desc, $"c_count".desc)
.show()
}
Expand Down

0 comments on commit 8719e44

Please sign in to comment.