Skip to content

Commit

Permalink
Fix bug in DictionaryVector with nullable indices
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Hulette committed Feb 28, 2018
1 parent 2888657 commit 3fb9a26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/src/vector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,9 @@ export class DictionaryVector<T extends DataType = DataType> extends Vector<Dict
public readonly dictionary: Vector<T>;
constructor(data: Data<Dictionary<T>>, view: View<Dictionary<T>> = new DictionaryView<T>(data.dictionary, new IntVector(data.indices))) {
super(data as Data<any>, view);
if (view instanceof ValidityView) {
view = (view as any).view;
}
if (data instanceof DictionaryData && view instanceof DictionaryView) {
this.indices = view.indices;
this.dictionary = data.dictionary;
Expand Down

0 comments on commit 3fb9a26

Please sign in to comment.