srowen commented on a change in pull request #26728: [SPARK-30012][CORE][SQL]
Change classes extending scala collection classes to work with 2.13
URL: https://github.com/apache/spark/pull/26728#discussion_r352364977
##########
File path:
core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala
##########
@@ -367,7 +367,7 @@ class ExternalAppendOnlyMap[K, V, C](
private def removeFromBuffer[T](buffer: ArrayBuffer[T], index: Int): T = {
val elem = buffer(index)
buffer(index) = buffer(buffer.size - 1) // This also works if index ==
buffer.size - 1
- buffer.reduceToSize(buffer.size - 1)
+ buffer.trimEnd(1)
Review comment:
reduceToSize is no longer exposed in 2.13. This should work alike, though
does a little more work than reduceToSize does.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]