You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2023/03/28 14:07:08 UTC

[spark] branch master updated: [SPARK-42927][CORE] Change the access scope of `o.a.spark.util.Iterators#size` to `private[util]`

This is an automated email from the ASF dual-hosted git repository.

srowen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e4c352d5f9 [SPARK-42927][CORE] Change the access scope of `o.a.spark.util.Iterators#size` to `private[util]`
6e4c352d5f9 is described below

commit 6e4c352d5f91f8343cec748fea4723178d5ae9af
Author: yangjie01 <ya...@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 <ya...@baidu.com>
    Signed-off-by: Sean Owen <sr...@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-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org