Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15305

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.0.1
    • None
    • JavaScript
    • None

    Description

      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)];
          }
      }

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            bmatcuk Bob Matcuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: