FieldValues: Use plain arrays instead of Vector (part 3 of 2) (#66612)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Leon Sorokin
2023-04-20 17:59:18 +03:00
committed by GitHub
co-authored by Ryan McKinley
parent 24696d593b
commit b24ba7b7ae
109 changed files with 594 additions and 648 deletions
@@ -1,4 +1,4 @@
import { QueryResultMeta } from '../types';
import { makeArrayIndexableVector, QueryResultMeta } from '../types';
import { Field, FieldType, DataFrame } from '../types/dataFrame';
import { FunctionalVector } from '../vector/FunctionalVector';
import { vectorToArray } from '../vector/vectorToArray';
@@ -15,6 +15,7 @@ class ArrayPropertyVector<T = any> extends FunctionalVector<T> {
constructor(private source: any[], private prop: string) {
super();
return makeArrayIndexableVector(this);
}
get length(): number {
@@ -64,6 +65,7 @@ export class ArrayDataFrame<T = any> extends FunctionalVector<T> implements Data
} else {
this.setFieldsFromObject(first);
}
return makeArrayIndexableVector(this);
}
/**