This is an automated email from the ASF dual-hosted git repository. srowen pushed a commit to branch branch-3.4 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push: new 312447055b3 [SPARK-42927][CORE] Change the access scope of `o.a.spark.util.Iterators#size` to `private[util]` 312447055b3 is described below commit 312447055b34a943f329c35e588dbd460fa4f7a1 Author: yangjie01 <yangji...@baidu.com> AuthorDate: Tue Mar 28 09:06:50 2023 -0500 [SPARK-42927][CORE] Change the access scope of `o.a.spark.util.Iterators#size` to `private[util]` ### What changes were proposed in this pull request? https://github.com/apache/spark/pull/37353 introduce `o.a.spark.util.Iterators#size` to speed up get `Iterator` size when using Scala 2.13. It will only be used by `o.a.spark.util.Utils#getIteratorSize`, and will disappear when Spark only supports Scala 2.13. It should not be public, so this pr change it access scope to `private[util]`. ### Why are the changes needed? `o.a.spark.util.Iterators#size` should not public. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? - Pass GitHub Actions Closes #40556 from LuciferYang/SPARK-42927. Authored-by: yangjie01 <yangji...@baidu.com> Signed-off-by: Sean Owen <sro...@gmail.com> (cherry picked from commit 6e4c352d5f91f8343cec748fea4723178d5ae9af) Signed-off-by: Sean Owen <sro...@gmail.com> --- core/src/main/scala-2.12/org/apache/spark/util/Iterators.scala | 2 +- core/src/main/scala-2.13/org/apache/spark/util/Iterators.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala-2.12/org/apache/spark/util/Iterators.scala b/core/src/main/scala-2.12/org/apache/spark/util/Iterators.scala index 59530b4ba27..af5f369de53 100644 --- a/core/src/main/scala-2.12/org/apache/spark/util/Iterators.scala +++ b/core/src/main/scala-2.12/org/apache/spark/util/Iterators.scala @@ -17,7 +17,7 @@ package org.apache.spark.util -object Iterators { +private[util] object Iterators { /** * Counts the number of elements of an iterator using a while loop rather than calling diff --git a/core/src/main/scala-2.13/org/apache/spark/util/Iterators.scala b/core/src/main/scala-2.13/org/apache/spark/util/Iterators.scala index 0ffba8d13a3..9756cf49b95 100644 --- a/core/src/main/scala-2.13/org/apache/spark/util/Iterators.scala +++ b/core/src/main/scala-2.13/org/apache/spark/util/Iterators.scala @@ -17,7 +17,7 @@ package org.apache.spark.util -object Iterators { +private[util] object Iterators { /** * Counts the number of elements of an iterator. --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org