Commit d0470409 by Ryan McKinley Committed by GitHub

Chore: export arrow dataframe utilities (#22016)

* export arrow dataframe

* use the same table
parent f4816963
......@@ -112,7 +112,13 @@ function toArrowVector(field: Field): ArrowVector {
}
export function grafanaDataFrameToArrowTable(data: DataFrame): Table {
const table = Table.new(
// Return the original table
let table = (data as any).table;
if (table instanceof Table) {
return table as Table;
}
table = Table.new(
data.fields.map(field => {
const column = Column.new(field.name, toArrowVector(field));
if (field.labels) {
......
......@@ -4,6 +4,4 @@ export * from './CircularDataFrame';
export * from './MutableDataFrame';
export * from './processDataFrame';
export * from './dimensions';
// Phantom JS :(
//export * from './ArrowDataFrame';
export * from './ArrowDataFrame';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment