Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-45690][CORE][SQL] Clean up deprecated type use of BufferedIterator/CanBuildFrom/Traversable #43569

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package org.apache.spark.storage

import scala.collection.generic.CanBuildFrom
import scala.collection.BuildFrom
import scala.collection.immutable.Iterable
import scala.concurrent.Future

Expand Down Expand Up @@ -261,7 +261,7 @@ class BlockManagerMaster(
val (blockManagerIds, futures) = response.unzip
val cbf =
implicitly[
CanBuildFrom[Iterable[Future[Option[BlockStatus]]],
BuildFrom[Iterable[Future[Option[BlockStatus]]],
Option[BlockStatus],
Iterable[Option[BlockStatus]]]]
val blockStatus = timeout.awaitResult(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package org.apache.spark.util.collection
import java.io._
import java.util.Comparator

import scala.collection.BufferedIterator
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the used scala#BufferedIterator to scala.collection.BufferedIterator.

import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class ShuffleBlockFetcherIteratorSuite extends SparkFunSuite with PrivateMethodT
* same size and index.
*/
private def toBlockList(
blockIds: Traversable[BlockId],
blockIds: Iterable[BlockId],
blockSize: Long,
blockMapIndex: Int): Seq[(BlockId, Long, Int)] = {
blockIds.map(blockId => (blockId, blockSize, blockMapIndex)).toSeq
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.apache.spark.sql.execution

import scala.collection.BufferedIterator
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.expressions.{Ascending, Attribute, Expression, SortOrder}
import org.apache.spark.sql.catalyst.expressions.codegen.{GenerateOrdering, GenerateUnsafeProjection}
Expand Down