peter-toth commented on code in PR #59639:
URL: https://github.com/apache/spark/pull/59639#discussion_r4339164901
##########
sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/LateMaterializationParquetRecordReader.java:
##########
@@ -335,19 +368,26 @@ private void decideAllKeysMissingFile() {
*/
@Override
public boolean nextBatch() throws IOException {
+ readerThread = Thread.currentThread();
closeAll(publishedKeyVectors);
publishedKeyVectors = null;
+ publishedKeyCharge = 0L;
+ releaseSurvivorMemoryTo(heldCharge());
Review Comment:
Done in
[778c14954a9](https://github.com/apache/spark/pull/59639/commits/778c14954a9ede1af0fc6357b0b5546322e69a23),
as you suggested:
- a running total of the queued charges;
- a plain copy of the reservation;
- release in 1 MiB steps while a row group is emitted, and the rest when the
next row group loads.
A new test emits a 3.6 MB row group and pins the batches at which the
reservation steps down.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]