You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/08/24 12:36:01 UTC

[GitHub] [spark] LuciferYang opened a new pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps

LuciferYang opened a new pull request #29529:
URL: https://github.com/apache/spark/pull/29529


   ### What changes were proposed in this pull request?
   This pr just revert SPARK-32550  for performance.
   
   
   ### Why are the changes needed?
   I found that it had some negative impact on performance, the typical cases is "deterministic cardinality estimation" in `HyperLogLogPlusPlusSuite` when rsd is 0.001, we found the code that is significantly slower is line 41 in `HyperLogLogPlusPlusSuite`: `new SpecificInternalRow(hll.aggBufferAttributes.map(_.dataType)) `
   
   https://github.com/apache/spark/blob/08b951b1cb58cea2c34703e43202fe7c84725c8a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/aggregate/HyperLogLogPlusPlusSuite.scala#L40-L44
   
   The size of "hll.aggBufferAttributes" in this case is 209716, the results of comparison before and after spark-32550 merged are as follows, The unit is ns:
   
   
     | After   SPARK-32550 createBuffer | After   SPARK-32550 end to end | Before   SPARK-32550 createBuffer | Before   SPARK-32550 end to end
   -- | -- | -- | -- | --
   rsd 0.001, n   1000 | 52715513243 | 53004810687 | 195807999 | 773977677
   rsd 0.001, n   5000 | 51881246165 | 52519358215 | 13689949 | 249974855
   rsd 0.001, n   10000 | 52234282788 | 52374639172 | 14199071 | 183452846
   rsd 0.001, n   50000 | 55503517122 | 55664035449 | 15219394 | 584477125
   rsd 0.001, n   100000 | 51862662845 | 52116774177 | 19662834 | 166483678
   rsd 0.001, n   500000 | 51619226715 | 52183189526 | 178048012 | 16681330
   rsd 0.001, n   1000000 | 54861366981 | 54976399142 | 226178708 | 18826340
   rsd 0.001, n   5000000 | 52023602143 | 52354615149 | 388173579 | 15446409
   rsd 0.001, n   10000000 | 53008591660 | 53601392304 | 533454460 | 16033032
   
   
   ### Does this PR introduce _any_ user-facing change?
   no
   
   ### How was this patch tested?
   `mvn test -pl sql/catalyst -DwildcardSuites=org.apache.spark.sql.catalyst.expressions.aggregate.HyperLogLogPlusPlusSuite -Dtest=none` 
   
   **Before**: 8 m 18 s 320 ms 
   **After**: 6s 278ms
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon closed pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #29529:
URL: https://github.com/apache/spark/pull/29529


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps"

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679134486


   @srowen you are right ~, I'll run a sql/catalyst module test and update it later


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] msamirkhan commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
msamirkhan commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r475753823



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map

Review comment:
       Minor: comment update.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679349131






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679172039


   I made this into a follow up for the original JIRA. they go together tightly.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679167695






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679171111


   **[Test build #127842 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127842/testReport)** for PR 29529 at commit [`9447197`](https://github.com/apache/spark/commit/9447197e8bd7cc5fbac44c8a46fbdbf3f3ad4973).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-680417215


   thx @srowen @HyukjinKwon @msamirkhan 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679349131






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679171111


   **[Test build #127842 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127842/testReport)** for PR 29529 at commit [`9447197`](https://github.com/apache/spark/commit/9447197e8bd7cc5fbac44c8a46fbdbf3f3ad4973).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r476027235



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map
     this(new Array[MutableValue](dataTypes.length))
-    val length = values.length
     var i = 0
-    while (i < length) {
-      values(i) = dataTypeToMutableValue(dataTypes(i))
+    dataTypes.foreach { dt =>

Review comment:
       Sorry, I fell asleep yesterday.......  and Address [9976bf5](https://github.com/apache/spark/pull/29529/commits/9976bf55a6ec7833e31b03433cff09acc696c644) update the comments.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] msamirkhan commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
msamirkhan commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r475753823



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map

Review comment:
       Minor: update comment.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679445188






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps"

Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679126671


   That is a very big difference. While that test may be a relatively obscure path, and we don't want to lose the benefit of this optimization elsewhere, I agree it's a concern. I wonder if there is a way to make it all faster.
   
   I am really struggling to understand why the change could make that large of a difference. In the main, it should avoid an array copy and that should be a win. I wonder if somehow the `Seq` passed here is not an `IndexedSeq` so that indexing it is not constant time?
   
   Could we try this implementation instead to see if that is the case?
   
   ```
     def this(dataTypes: Seq[DataType]) = {
       // SPARK-32550: use while loop instead of map
       this(new Array[MutableValue](dataTypes.length))
       var i = 0
       dataTypes.foreach { dt =>
         values(i) = dataTypeToMutableValue(dt)
         i += 1
       }
     }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679178490


   Looks good to me too given the benchmark results.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r476026047



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map

Review comment:
       Address [9976bf5](https://github.com/apache/spark/pull/29529/commits/9976bf55a6ec7833e31b03433cff09acc696c644) update the comments.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679167695






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r475676736



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map
     this(new Array[MutableValue](dataTypes.length))
-    val length = values.length
     var i = 0
-    while (i < length) {
-      values(i) = dataTypeToMutableValue(dataTypes(i))
+    dataTypes.foreach { dt =>

Review comment:
       Let's also add a short comment. Using plan while is actually recommanded per the guide at https://github.com/databricks/scala-style-guide#traversal-and-zipwithindex so it's likely people attempt to use while here in the future




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r476027235



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map
     this(new Array[MutableValue](dataTypes.length))
-    val length = values.length
     var i = 0
-    while (i < length) {
-      values(i) = dataTypeToMutableValue(dataTypes(i))
+    dataTypes.foreach { dt =>

Review comment:
       Sorry, I fell asleep yesterday.......  and Address [9976bf5](https://github.com/apache/spark/pull/29529/commits/9976bf55a6ec7833e31b03433cff09acc696c644) update the comments.Any other issues that need to be updated?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps"

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679118910


   cc @srowen @HyukjinKwon @dongjoon-hyun @msamirkhan 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679347301


   **[Test build #127842 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127842/testReport)** for PR 29529 at commit [`9447197`](https://github.com/apache/spark/commit/9447197e8bd7cc5fbac44c8a46fbdbf3f3ad4973).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679103340


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679102742


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679840636


   **[Test build #127862 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127862/testReport)** for PR 29529 at commit [`9976bf5`](https://github.com/apache/spark/commit/9976bf55a6ec7833e31b03433cff09acc696c644).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on a change in pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r475649740



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map
     this(new Array[MutableValue](dataTypes.length))
-    val length = values.length
     var i = 0
-    while (i < length) {
-      values(i) = dataTypeToMutableValue(dataTypes(i))
+    dataTypes.foreach { dt =>
+      values(i) = dataTypeToMutableValue(dt)

Review comment:
       Because `schema.fields` is a `Array` , support random access, so there was no change of `def this(schema: StructType) ` constructor.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] srowen commented on a change in pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
srowen commented on a change in pull request #29529:
URL: https://github.com/apache/spark/pull/29529#discussion_r475680037



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/SpecificInternalRow.scala
##########
@@ -208,10 +208,9 @@ final class SpecificInternalRow(val values: Array[MutableValue]) extends BaseGen
   def this(dataTypes: Seq[DataType]) = {
     // SPARK-32550: use while loop instead of map
     this(new Array[MutableValue](dataTypes.length))
-    val length = values.length
     var i = 0
-    while (i < length) {
-      values(i) = dataTypeToMutableValue(dataTypes(i))
+    dataTypes.foreach { dt =>

Review comment:
       Heh we should probably update the style guide to note exactly this - that is only an 'optimization' if you have constant-time access to both sequences.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679444749


   **[Test build #127862 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127862/testReport)** for PR 29529 at commit [`9976bf5`](https://github.com/apache/spark/commit/9976bf55a6ec7833e31b03433cff09acc696c644).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679445188






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679841964






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang edited a comment on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps"

Posted by GitBox <gi...@apache.org>.
LuciferYang edited a comment on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679134486


   @srowen you are right ~, I'll run a sql/catalyst module test and update code later


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679460743


   I am going to merge since the last commit is comments only.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679166626


   ok to test


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679103340


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: Revert "[SPARK-32550][SQL] Make SpecificInternalRow constructors faster by using while loops instead of maps

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679102742


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679841964






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] HyukjinKwon commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679460875


   Merged to master.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] LuciferYang commented on pull request #29529: [SPARK-32690][SQL] Eliminate negative impact from SPARK-32550

Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679170155


   @srowen @HyukjinKwon  Now the test performance returned to normal
   
   ```
   Run completed in 7 seconds, 65 milliseconds.
   Total number of tests run: 5
   Suites: completed 2, aborted 0
   Tests: succeeded 5, failed 0, canceled 0, ignored 0, pending 0
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29529: [SPARK-32550][SQL][FOLLOWUP] Eliminate negative impact on HyperLogLogSuite

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29529:
URL: https://github.com/apache/spark/pull/29529#issuecomment-679444749


   **[Test build #127862 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127862/testReport)** for PR 29529 at commit [`9976bf5`](https://github.com/apache/spark/commit/9976bf55a6ec7833e31b03433cff09acc696c644).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org