lancedb / lancedb/flight-sql-js-client
Add a collectToIpc for zero-copy transmission that isn't version-locked to Arrow
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Currently when users grab results they are given two less than ideal options. They can use collectToArrow which will return the results as Arrow objects. This requires a very exact match between the library Arrow version and the caller Arrow version. This is even more difficult than the usual headache (bumping user library requires bumping flight library) because JS can easily duplicate dependencies or code paths in the presence of bundlers. For this reason it is often safest to use collectToObjects. However, collectToObjects is not a zero-copy operation and requires the data to be marshaled into JS.
An alternative, which should give the best of both worlds, is to collect into an IPC stream. The caller can then decode the IPC stream with their Arrow library. This will copy all the metadata but none of the data. This should allow callers to use whatever Arrow version they desire.
Contributor guide
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.
Research direction
Start by tracing the existing collectToArrow and collectToObjects entry points and how results are returned to callers. Determine the IPC stream boundary and validate that metadata can be copied without copying the underlying data. Done means a collectToIpc API is available and callers can decode its result with their chosen Arrow version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100