Repository navigation
Conversation
|
|
Author
|
My understanding before implementing/opening the PR - Function
|
Author
Author
|
cc @pitrou |
pitrou
requested changes
Oct 22, 2026
pitrou
left a comment
Member
There was a problem hiding this comment.
Thanks for doing this @omkar-334 . This looks good on the principle, just a small suggestion for improving tests.
|
|
||
| result = pq.read_table(path, memory_pool=proxy_pool) | ||
| assert result.equals(table) | ||
| assert proxy_pool.max_memory() > 0 |
Member
There was a problem hiding this comment.
How about we exercise this a bit more specifically, such as:
Suggested change
| assert proxy_pool.max_memory() > 0 | |
| assert proxy_pool.bytes_allocated() >= table.nbytes | |
| result = None | |
| assert proxy_pool.bytes_allocated() == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Rationale for this change
pq.read_tablehas no way to pass a memory pool.ParquetReaderandDataset.to_tablealready accept one, it just wasn't added.What changes are included in this PR?
I added a
memory_poolargument toread_table,ParquetFileandParquetDataset. It is passed toParquetReaderand toDataset.to_table, with docstrings updated.Are these changes tested?
Yes. I added new tests in
test_basic.py- It reads a Parquet file with a tracked memory pool and check that the pool was actually used. They coverread_table,ParquetFileandParquetDataset.Are there any user-facing changes?
New optional
memory_poolkeyword. No breaking changes.Was AI used for this PR?
PR code and description written by:
Reviewed before submission by:
Github Issue - #54637