You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yang Jie (Jira)" <ji...@apache.org> on 2022/02/27 03:53:00 UTC

[jira] [Updated] (SPARK-38337) Replace `toIterator` with `iterator` for `IterableLike`/`IterableOnce` to cleanup deprecated api usage

     [ https://issues.apache.org/jira/browse/SPARK-38337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yang Jie updated SPARK-38337:
-----------------------------
    Description: 
In Scala 2.12, {{IterableLike.toIterator}} identified as {{{}@deprecatedOverriding{}}}:

 
{code:java}
@deprecatedOverriding("toIterator should stay consistent with iterator for all Iterables: override iterator instead.", "2.11.0") 
override def toIterator: Iterator[A] = iterator {code}
In Scala 2.13, {{IterableOnce.toIterator}} identified as {{{}@deprecated{}}}:
{code:java}
@deprecated("Use .iterator instead of .toIterator", "2.13.0") @`inline` final def toIterator: Iterator[A] = iterator {code}

  was:
In Scala 2.12, {{IterableLike.toIterator}} identified as {{{}@deprecatedOverriding{}}}:

 
{code:java}
@deprecatedOverriding("toIterator should stay consistent with iterator for all Iterables: override iterator instead.", "2.11.0") override def toIterator: Iterator[A] = iterator {code}
In Scala 2.13, {{IterableOnce.toIterator}} identified as {{{}@deprecated{}}}:
{code:java}
@deprecated("Use .iterator instead of .toIterator", "2.13.0") @`inline` final def toIterator: Iterator[A] = iterator {code}


> Replace `toIterator` with `iterator` for `IterableLike`/`IterableOnce` to cleanup deprecated api usage
> ------------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-38337
>                 URL: https://issues.apache.org/jira/browse/SPARK-38337
>             Project: Spark
>          Issue Type: Improvement
>          Components: DStreams, MLlib, Spark Core, SQL
>    Affects Versions: 3.3.0
>            Reporter: Yang Jie
>            Priority: Minor
>
> In Scala 2.12, {{IterableLike.toIterator}} identified as {{{}@deprecatedOverriding{}}}:
>  
> {code:java}
> @deprecatedOverriding("toIterator should stay consistent with iterator for all Iterables: override iterator instead.", "2.11.0") 
> override def toIterator: Iterator[A] = iterator {code}
> In Scala 2.13, {{IterableOnce.toIterator}} identified as {{{}@deprecated{}}}:
> {code:java}
> @deprecated("Use .iterator instead of .toIterator", "2.13.0") @`inline` final def toIterator: Iterator[A] = iterator {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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