Proposed ArrowRecordBatchAdapter to replace ParquetReader with `read_from_memory_tables=True`
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #519 by @arhamchopra — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- data-engineering, stream-processing
Research direction
Start by reading the existing ParquetReader path that handles read_from_memory_tables=True and determine how it consumes in-memory Arrow tables or record batches. Define the scope of a dedicated ArrowRecordBatchAdapter, including conversion of lists and structs and whether timestamp grouping is included. Done should provide a discoverable adapter with efficient, ideally zero-copy handling and behavior covered by appropriate tests.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
The ability to stream a sequence of in-memory arrow tables into csp is very powerful, but currently a bit hidden within the ParquetReader implementation (by setting read_from_memory_tables=True), making it hard for users to find. It can also be a bit tricky to use properly as many of the arguments to the parquet reader are ignored in this mode.
Describe the solution you'd like
A dedicated pull adapter that consumes a serquence of arrow record batches (or tables) as efficiently as possible. i.e. ArrowRecordBatchAdapter.
An initial implementation could just delegate to the ParquetReader for implementation.
Also, the solution should ideally be zero-copy on the underlying arrow tables (I am not positive this is the case at the moment).
Describe alternatives you've considered
Continuing to use the parquet reader is confusing and non-intuitive, especially for cases where the arrow tables come from other sources.
Additional context
Other features to consider
- Being able to convert arrow lists as numpy arrays (like the current parquet reader)
- Being able to convert arrow structs as csp structs
- An option such at that each timestamp, it ticks an arrow record batches containing all the records with that timestamp (in cases where we want to minimize any copy overhead and just operate on arrow types directly). This is essentially a "group-by" on the timestamp column.
Note that since there are a number of other tools that can efficiently and flexibly produce sequences of arrow tables from different sources (polars, duckdb, arrow-odbc, ray), having a generic ArrowRecordBatchAdapter will allow an even greater number of historical data connections with very little additional effort.
- Dominant language
- Python
- Stars
- 450
- Forks
- 91
- Avg merge
- 18h 8m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Point72/csp
-
Add docs about transitioning from replay to realtime by setting start date in the pastPossibly taken @russlan23 claimed this 99 days ago. Openpart: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
RuntimeWarning: non-string key in the __dict__ of class OutputsMay be free again A pull request for this issue was closed without being merged. Opentype: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
csp::Struct leaks one StructMeta reference per constructionPossibly taken @jieya907 claimed this 36 days ago. Opengood first issue type: bug
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
csp.output does not support dict unpackingPossibly taken @aadya940 claimed this 107 days ago. Opentype: feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
Similar issues
-
[BUG] HTTP lifecycle dispatch treats a NO_PROXY-only environment as corporate egress and skips the resolve-and-pinned sessionPossibly taken @bodapatisaikrishna claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
langchain-ai/docs#7652 ·
Maintainers usually reply within 1 day
-
[oblt-aw][autodoc] Document new e2e-secret-leak-artifacts workflow and update e2e-all leaf listOpen
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
elastic/oblt-aw#2513 · 1 comment ·
Maintainers usually reply within 1 day
-
bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 75/100
NCAR/CLM-Tutorial#113 · 1 comment ·
Maintainers usually reply within 1 day