Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
asfimport opened this issue Jan 11, 2022 · 0 comments
Open

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

asfimport opened this issue Jan 11, 2022 · 0 comments
Labels
Type: bug Something isn't working

Comments

@asfimport
Copy link

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:

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

 

Reporter: Bob Matcuk / @bmatcuk

Note: This issue was originally created as ARROW-15305. Please see the migration documentation for further details.

@assignUser assignUser transferred this issue from apache/arrow May 26, 2025
@assignUser assignUser added the Type: bug Something isn't working label May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants