[js] Incorrect value returned for columns named "size"
- 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
Assessment
This issue has not been assessed yet.