You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Bob Matcuk (Jira)" <ji...@apache.org> on 2022/01/11 19:43:00 UTC
[jira] [Created] (ARROW-15305) [js] Incorrect value returned for columns named "size"
Bob Matcuk created ARROW-15305:
----------------------------------
Summary: [js] Incorrect value returned for columns named "size"
Key: ARROW-15305
URL: https://issues.apache.org/jira/browse/ARROW-15305
Project: Apache Arrow
Issue Type: Bug
Components: JavaScript
Affects Versions: 6.0.1
Reporter: Bob Matcuk
I discovered this issue using a row's {{toJSON()}} function. The problem is here: [https://github.com/apache/arrow/blob/fc1d7d44317b20f899928755b05a774715f27ce8/js/src/vector/row.ts#L195]
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:
{code:java}
public *values() {
for (const field of this[kParent].type.children) {
yield (this as RowLike<T>)[this[kKeyToIdx].get(field.name)];
}
}{code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)