Skip to content

Commit 8719e44

Browse files
adamsitnikimback82
authored andcommitted
TPCH Benchmark fixes (#44)
1 parent 43775f1 commit 8719e44

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

benchmark/csharp/Tpch/Program.cs

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ private static void Main(string[] args)
1818
Console.WriteLine("\t<spark-submit> --master local");
1919
Console.WriteLine("\t\t--class org.apache.spark.deploy.DotnetRunner <path-to-microsoft-spark-jar>");
2020
Console.WriteLine("\t\tTpch.exe <tpch_data_root_path> <query_number> <num_iterations> <true for SQL | false for functional>");
21+
22+
return;
2123
}
2224

2325
var tpchRoot = args[0];

benchmark/scala/src/main/scala/com/microsoft/tpch/App.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ object App {
1414
def main(args: Array[String]) {
1515
if (args.length != 4) {
1616
println("Usage:")
17-
println("\t<spark-submit> --master local --class com.microsoft.tpch.App microsoft-spark-examples-<version>.jar")
17+
println("\t<spark-submit> --master local --class com.microsoft.tpch.App microsoft-spark-benchmark-<version>.jar")
1818
println("\t\t<tpch_data_root_path> <query_number> <num_iterations> <true for SQL | false for functional>")
19+
20+
return
1921
}
2022

2123
val tpchRoot = args(0)

benchmark/scala/src/main/scala/com/microsoft/tpch/TpchFunctionalQueries.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ class TpchFunctionalQueries(spark: SparkSession, tpchRoot: String)
250250

251251
customer.join(order, $"c_custkey" === order("o_custkey")
252252
&& !special(order("o_comment")), "left_outer")
253-
.groupBy($"o_custkey")
253+
.groupBy($"c_custkey")
254254
.agg(count($"o_orderkey").as("c_count"))
255255
.groupBy($"c_count")
256-
.agg(count($"o_custkey").as("custdist"))
256+
.agg(count($"*").as("custdist"))
257257
.sort($"custdist".desc, $"c_count".desc)
258258
.show()
259259
}

0 commit comments

Comments
 (0)