Commit ae7328fb by Ryan McKinley Committed by GitHub

Arrow: cast timestams to Number (#29402)

parent 12a07aff
...@@ -68,6 +68,7 @@ export function arrowTableToDataFrame(table: Table): ArrowDataFrame { ...@@ -68,6 +68,7 @@ export function arrowTableToDataFrame(table: Table): ArrowDataFrame {
} }
case ArrowType.Timestamp: { case ArrowType.Timestamp: {
type = FieldType.time; type = FieldType.time;
values = new NumberColumn(col); // Cast to number
break; break;
} }
case ArrowType.Utf8: { case ArrowType.Utf8: {
......
...@@ -6,7 +6,6 @@ import { ...@@ -6,7 +6,6 @@ import {
Field, Field,
DataFrame, DataFrame,
getTimeField, getTimeField,
dateTime,
getFieldDisplayName, getFieldDisplayName,
getColorForTheme, getColorForTheme,
} from '@grafana/data'; } from '@grafana/data';
...@@ -47,7 +46,7 @@ export class DataProcessor { ...@@ -47,7 +46,7 @@ export class DataProcessor {
const datapoints = []; const datapoints = [];
for (let r = 0; r < series.length; r++) { for (let r = 0; r < series.length; r++) {
datapoints.push([field.values.get(r), dateTime(timeField.values.get(r)).valueOf()]); datapoints.push([field.values.get(r), timeField.values.get(r)]);
} }
list.push(this.toTimeSeries(field, name, i, j, datapoints, list.length, range)); list.push(this.toTimeSeries(field, name, i, j, datapoints, list.length, range));
......
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