Repository: spark
Updated Branches:
  refs/heads/master 0d7396f3a -> 6abe90625


[SPARK-25676][SQL][FOLLOWUP] Use 'foreach(_ => ())'

## What changes were proposed in this pull request?

#22970 fixed Scala 2.12 build error, and this PR updates the function according 
to the review comments.

## How was this patch tested?

This is also manually tested with Scala 2.12 build.

Closes #22978 from dongjoon-hyun/SPARK-25676-3.

Authored-by: Dongjoon Hyun <dongj...@apache.org>
Signed-off-by: Wenchen Fan <wenc...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6abe9062
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6abe9062
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6abe9062

Branch: refs/heads/master
Commit: 6abe90625efeb8140531a875700e87ed7e981044
Parents: 0d7396f
Author: Dongjoon Hyun <dongj...@apache.org>
Authored: Thu Nov 8 23:37:14 2018 +0800
Committer: Wenchen Fan <wenc...@databricks.com>
Committed: Thu Nov 8 23:37:14 2018 +0800

----------------------------------------------------------------------
 sql/core/benchmarks/WideTableBenchmark-results.txt    | 14 +++++++-------
 .../sql/execution/benchmark/WideTableBenchmark.scala  |  3 +--
 2 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6abe9062/sql/core/benchmarks/WideTableBenchmark-results.txt
----------------------------------------------------------------------
diff --git a/sql/core/benchmarks/WideTableBenchmark-results.txt 
b/sql/core/benchmarks/WideTableBenchmark-results.txt
index 7bc388a..8c09f9c 100644
--- a/sql/core/benchmarks/WideTableBenchmark-results.txt
+++ b/sql/core/benchmarks/WideTableBenchmark-results.txt
@@ -6,12 +6,12 @@ OpenJDK 64-Bit Server VM 1.8.0_191-b12 on Linux 
3.10.0-862.3.2.el7.x86_64
 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
 projection on wide table:                Best/Avg Time(ms)    Rate(M/s)   Per 
Row(ns)   Relative
 
------------------------------------------------------------------------------------------------
-split threshold 10                          39634 / 39829          0.0       
37798.3       1.0X
-split threshold 100                         30121 / 30571          0.0       
28725.8       1.3X
-split threshold 1024                          9678 / 9725          0.1        
9229.9       4.1X
-split threshold 2048                          8634 / 8662          0.1        
8233.6       4.6X
-split threshold 4096                          8561 / 8576          0.1        
8164.6       4.6X
-split threshold 8192                          8393 / 8408          0.1        
8003.8       4.7X
-split threshold 65536                       57063 / 57273          0.0       
54419.1       0.7X
+split threshold 10                          40571 / 40937          0.0       
38691.7       1.0X
+split threshold 100                         31116 / 31669          0.0       
29674.6       1.3X
+split threshold 1024                        10077 / 10199          0.1        
9609.7       4.0X
+split threshold 2048                          8654 / 8692          0.1        
8253.2       4.7X
+split threshold 4096                          8006 / 8038          0.1        
7634.7       5.1X
+split threshold 8192                          8069 / 8107          0.1        
7695.3       5.0X
+split threshold 65536                       56973 / 57204          0.0       
54333.7       0.7X
 
 

http://git-wip-us.apache.org/repos/asf/spark/blob/6abe9062/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/WideTableBenchmark.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/WideTableBenchmark.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/WideTableBenchmark.scala
index c61db3c..52426d8 100644
--- 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/WideTableBenchmark.scala
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/benchmark/WideTableBenchmark.scala
@@ -18,7 +18,6 @@
 package org.apache.spark.sql.execution.benchmark
 
 import org.apache.spark.benchmark.Benchmark
-import org.apache.spark.sql.Row
 import org.apache.spark.sql.internal.SQLConf
 
 /**
@@ -43,7 +42,7 @@ object WideTableBenchmark extends SqlBasedBenchmark {
       Seq("10", "100", "1024", "2048", "4096", "8192", "65536").foreach { n =>
         benchmark.addCase(s"split threshold $n", numIters = 5) { iter =>
           withSQLConf(SQLConf.CODEGEN_METHOD_SPLIT_THRESHOLD.key -> n) {
-            df.selectExpr(columns: _*).foreach((x => x): Row => Unit)
+            df.selectExpr(columns: _*).foreach(_ => ())
           }
         }
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to