Skip to content

Commit

Permalink
Don't materialize batches seq
Browse files Browse the repository at this point in the history
  • Loading branch information
dmivankov committed Dec 9, 2024
1 parent 856c173 commit 3b93822
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/scala/cognite/spark/v1/RawTableRelation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ class RawTableRelation(
// start on the next batch (this limitation used to be per partition). Instead, we should
// have a cats.effect.std.Semaphore permit with X number of outstanding requests
// or cats.effect.concurrent.Backpressure.
rows
.grouped(batchSize)
.toSeq
(rows.grouped(batchSize): Iterator[Seq[Row]])
.grouped(maxOutstandingRawInsertRequests)
.foreach { batch =>
batch.toVector
Expand Down

0 comments on commit 3b93822

Please sign in to comment.