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

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
Ryan McKinley
2023-04-14 07:03:45 -07:00
committed by GitHub
parent 6d53c87862
commit e65163ba4e
57 changed files with 374 additions and 448 deletions

View File

@@ -1,5 +1,4 @@
import {
ArrayVector,
DataFrame,
DataFrameJSON,
DataFrameView,
@@ -181,8 +180,8 @@ export class BlugeSearcher implements GrafanaSearcher {
// Append the raw values to the same array buffer
const length = frame.length + view.dataFrame.length;
for (let i = 0; i < frame.fields.length; i++) {
const values = (view.dataFrame.fields[i].values as ArrayVector).buffer;
values.push(...frame.fields[i].values.toArray());
const values = view.dataFrame.fields[i].values;
values.push(...frame.fields[i].values);
}
view.dataFrame.length = length;