Skip to content

Commit

Permalink
fix handling of null values in arrow vectors (#2195)
Browse files Browse the repository at this point in the history
* closes #2194
  • Loading branch information
Fil authored Oct 11, 2024
1 parent 6a0aa7e commit d707835
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,12 @@ function maybeTypedArrowify(vector, type) {
return vector == null
? vector
: (type === undefined || type === Array) && isArrowDateType(vector.type)
? coerceDates(vector.toArray())
: maybeTypedArrayify(vector.toArray(), type);
? coerceDates(vectorToArray(vector))
: maybeTypedArrayify(vectorToArray(vector), type);
}

function vectorToArray(vector) {
return vector.nullCount ? vector.toJSON() : vector.toArray();
}

export const singleton = [null]; // for data-less decoration marks, e.g. frame
Expand Down

0 comments on commit d707835

Please sign in to comment.