Repository navigation
Conversation
|
|
|
My understanding before implementing/opening the PR - Function
|
|
cc @pitrou |
pitrou
left a comment
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 |
There was a problem hiding this comment.
How about we exercise this a bit more specifically, such as:
| assert proxy_pool.max_memory() > 0 | |
| assert proxy_pool.bytes_allocated() >= table.nbytes | |
| result = None | |
| assert proxy_pool.bytes_allocated() == 0 |
There was a problem hiding this comment.
understood. I've made this change for all tests I added, since they test the same thing.

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