apache / apache/arrow-js

[js] Incorrect value returned for columns named "size"

Open
#95 2 comments 0 reactions 1 assignee Claimed by @Divyanshu-s13 View on GitHub
Type: bug
Dominant language
TypeScript
Stars
112
Forks
23
Avg merge
21h 18m
Merged PRs (30d)
8

Description

I discovered this issue using a row's `toJSON()` function. The problem is here:

When `field.name` is "size", `this["size"]` will return the value of the size property on the Row instead of the value of the column. I fixed it locally by changing the values function to:
```java

public *values() {
for (const field of this[kParent].type.children) {
yield (this as RowLike)[this[kKeyToIdx].get(field.name)];
}
}
```
 

**Reporter**: [Bob Matcuk](https://issues.apache.org/jira/browse/ARROW-15305) / @bmatcuk

**Note**: *This issue was originally created as [ARROW-15305](https://issues.apache.org/jira/browse/ARROW-15305). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.