Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/12102#discussion_r58289406
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/BenchmarkWholeStageCodegen.scala
---
@@ -141,20 +141,35 @@ class BenchmarkWholeStageCodegen extends
SparkFunSuite {
}
ignore("broadcast hash join") {
- val N = 100 << 20
+ val N = 20 << 20
val M = 1 << 16
val dim = broadcast(sqlContext.range(M).selectExpr("id as k", "cast(id
as string) as v"))
runBenchmark("Join w long", N) {
- sqlContext.range(N).join(dim, (col("id") bitwiseAND M) ===
col("k")).count()
+ sqlContext.range(N).join(dim, (col("id") % M) === col("k")).count()
}
/*
+ Java HotSpot(TM) 64-Bit Server VM 1.7.0_60-b19 on Mac OS X 10.9.5
Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz
Join w long: Best/Avg Time(ms) Rate(M/s)
Per Row(ns) Relative
-------------------------------------------------------------------------------------------
- Join w long codegen=false 5744 / 5814 18.3
54.8 1.0X
- Join w long codegen=true 735 / 853 142.7
7.0 7.8X
+ Join w long codegen=false 5351 / 5531 3.9
255.1 1.0X
+ Join w long codegen=true 275 / 352 76.2
13.1 19.4X
+ */
+
+ runBenchmark("Join w long duplicated", N) {
--- End diff --
what does long duplicated mean? do you mean non-unique key?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]