diff --git a/data/time_series.go b/data/time_series.go index 440fe14d8..0a4735b22 100644 --- a/data/time_series.go +++ b/data/time_series.go @@ -420,7 +420,7 @@ func WideToLong(wideFrame *Frame) (*Frame, error) { if err != nil { return nil, err } else if wideLen == 0 { - return nil, fmt.Errorf("can not convert to long series, input fields have no rows") + return nil, ErrInputFieldsWithoutRows } var uniqueValueNames []string // unique names of Fields that are value types diff --git a/data/time_series_errors.go b/data/time_series_errors.go index cdb327c9b..4859d75c3 100644 --- a/data/time_series_errors.go +++ b/data/time_series_errors.go @@ -5,6 +5,7 @@ import "errors" var ( ErrorNullTimeValues = errors.New("unable to process the data to wide series because input has null time values, make sure all time values are not null") ErrorSeriesUnsorted = errors.New("unable to process the data because it is not sorted in ascending order by time, please updated your query to sort the data by time and try again") + ErrInputFieldsWithoutRows = errors.New("can not convert to long series, input fields have no rows") ) \ No newline at end of file