Skip to content

Commit

Permalink
Revert "Don't materialize batches seq"
Browse files Browse the repository at this point in the history
This reverts commit 3b93822.
  • Loading branch information
dmivankov committed Dec 9, 2024
1 parent 3b93822 commit 3146bfb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/scala/cognite/spark/v1/RawTableRelation.scala
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ 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): Iterator[Seq[Row]])
rows
.grouped(batchSize)
.toSeq
.grouped(maxOutstandingRawInsertRequests)
.foreach { batch =>
batch.toVector
Expand Down

0 comments on commit 3146bfb

Please sign in to comment.