Github user sameeragarwal commented on a diff in the pull request:
https://github.com/apache/spark/pull/12379#discussion_r59921348
--- Diff:
sql/core/src/test/scala/org/apache/spark/sql/execution/BenchmarkWholeStageCodegen.scala
---
@@ -180,9 +180,47 @@ class BenchmarkWholeStageCodegen extends SparkFunSuite
{
Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
Aggregate w keys: Best/Avg Time(ms) Rate(M/s)
Per Row(ns) Relative
-------------------------------------------------------------------------------------------
- codegen = F 2219 / 2392 9.4
105.8 1.0X
- codegen = T hashmap = F 1330 / 1466 15.8
63.4 1.7X
- codegen = T hashmap = T 384 / 518 54.7
18.3 5.8X
+ codegen = F 2323 / 2567 9.0
110.8 1.0X
+ codegen = T hashmap = F 1182 / 1246 17.7
56.4 2.0X
+ codegen = T hashmap = T 381 / 489 55.0
18.2 6.1X
+ */
+ }
+
+ ignore("aggregate with randomized keys") {
+ val N = 20 << 20
+
+ val benchmark = new Benchmark("Aggregate w keys", N)
+ sqlContext.range(N).selectExpr("id", "floor(rand() * 10000) as
k").registerTempTable("test")
+
+ def f(): Unit = sqlContext.sql("select k, k, sum(id) from test group
by k, k").collect()
--- End diff --
I see. Doesn't `registerTempTable` materialize the table before registering
it? If not, is there a way to do that?
---
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]