You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Sean R. Owen (Jira)" <ji...@apache.org> on 2022/06/22 23:40:00 UTC
[jira] [Resolved] (SPARK-39545) Override `concat` method for `ExpressionSet` in Scala 2.13 to improve the performance
[ https://issues.apache.org/jira/browse/SPARK-39545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean R. Owen resolved SPARK-39545.
----------------------------------
Fix Version/s: 3.4.0
Resolution: Fixed
Issue resolved by pull request 36942
[https://github.com/apache/spark/pull/36942]
> Override `concat` method for `ExpressionSet` in Scala 2.13 to improve the performance
> -------------------------------------------------------------------------------------
>
> Key: SPARK-39545
> URL: https://issues.apache.org/jira/browse/SPARK-39545
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.4.0
> Reporter: Yang Jie
> Assignee: Yang Jie
> Priority: Minor
> Fix For: 3.4.0
>
>
> {{ExpressionSet ++}} method in the master branch a little slower than the branch-3.3 with Scala-2.13
>
> For example, write a microbenchmark as follows and run with Scala 2.13:
> {code:java}
> val valuesPerIteration = 100000
> val benchmark = new Benchmark("Test ExpressionSet ++ ", valuesPerIteration, output = output)
> val aUpper = AttributeReference("A", IntegerType)(exprId = ExprId(1))
> val initialSet = ExpressionSet(aUpper + 1 :: Rand(0) :: Nil)
> val setToAddWithSameDeterministicExpression = ExpressionSet(aUpper + 1 :: Rand(0) :: Nil)
> benchmark.addCase("Test ++") { _: Int =>
> for (_ <- 0L until valuesPerIteration) {
> initialSet ++ setToAddWithSameDeterministicExpression
> }
> }
> benchmark.run() {code}
> *branch-3.3 result:*
>
> {code:java}
> OpenJDK 64-Bit Server VM 1.8.0_312-b07 on Linux 4.14.0_1-0-0-45
> Intel(R) Xeon(R) Gold 6XXXC CPU @ 2.60GHz
> Test ExpressionSet ++ : Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
> ------------------------------------------------------------------------------------------------------------------------
> Test ++ 14 16 4 7.2 139.1 1.0X
> {code}
>
> *master result :*
> {code:java}
> OpenJDK 64-Bit Server VM 1.8.0_312-b07 on Linux 4.14.0_1-0-0-45
> Intel(R) Xeon(R) Gold 6XXXC CPU @ 2.60GHz
> Test ExpressionSet ++ : Best Time(ms) Avg Time(ms) Stdev(ms) Rate(M/s) Per Row(ns) Relative
> ------------------------------------------------------------------------------------------------------------------------
> Test ++ 16 19 5 6.1 163.9 1.0X
> {code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org