[JavaScript] Allow index access for `Table`, `RecordBatch`, and `Vector`
维护者通常 1 天内回复
评估
这个 Issue 还没有评估数据。
描述
Describe the enhancement requested
Certain codebases that previously uses row-oriented way to access data may wish to migrate to Arrow to save serialization and deserialization cost, and to be able to gain access to fast column-oriented operations. As it stands, Arrow is sort of a drop-in replacement to row-oriented data such as a JavaScript Array of objects. This is great to incrementally migrate legacy codebases to Arrow, as it is frequently infeasible to rewrite the application to use the column-oriented data access patterns. For most data, JavaScript-object-compatible and row-oriented access is already provided via the StructRowProxy. However, if the structs themselves include a Vector, existing code will break as it assumes the Vector object to behave like a JavaScript array, which it does not due to the lack of index access. An example of such a data structure is as follows:
[
{x: 1, y: [1, 2]},
{x: 2, y: [2, 3]},
]
In this case, with the Arrow JS library as it is, the API consumer is unable to get individual element of the y array via table[i].y[j]. Instead, the API consumer must use the API table.get(i).y.get(j). In the situation where we are migrating a legacy code base to Arrow, this requires a large refactor of the entire codebase, which is infeasible in a short time. This negates the advantage of using Arrow as a drop-in replacement and prevents incremental migration of code to Arrow.
Arrow should provide index access for the Vector object, as well as Table and RecordBatch for backward compatibility with JavaScript arrays.
Component(s)
JavaScript
- 主要语言
- TypeScript
- 星标
- 114
- 派生
- 35
- 平均合并
- 13 小时 35 分钟
- 30 天内合并 PR
- 5
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/arrow-js 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
-
The IPC reader accepts a column that is shorter than its RecordBatch, and fills the missing rows with nulls可能已有人在做 @Sealdot 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
The IPC reader ignores Schema.endianness: a big-endian stream reads 1, 2, 3 as 16777216, 33554432, 50331648可能已有人在做 @aniket-r2Dev2 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
tableFromIPC loops with no end on a file whose RecordBatch block points at a DictionaryBatch可能已有人在做 @aniket-r2Dev2 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
-
The stream reader drops a message of an unexpected type but not its body, and parses the body as the next messages可能已有人在做 @Umer-Butt07 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 80/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
simstudioai/sim#10710 ·
维护者通常 1 天内回复
-
bug:new
难度 2/5 1-3 小时 新手友好度 73/100
callstackincubator/simlock#2088 ·
维护者通常 1 天内回复
-
Make the HTTP server's keep-alive and headers timeouts configurable可能已有人在做 @mattgodbolt 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
compiler-explorer/compiler-explorer#9902 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复