Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export ErrorInputFieldsWithoutRowsWideSeries error #1249

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/time_series.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func LongToWide(longFrame *Frame, fillMissing *FillMissing) (*Frame, error) {
return nil, err
}
if longLen == 0 {
return nil, fmt.Errorf("can not convert to wide series, input fields have no rows")
return nil, ErrorInputFieldsWithoutRowsWideSeries
}

wideFrame := NewFrame(longFrame.Name, NewField(longFrame.Fields[tsSchema.TimeIndex].Name, nil, []time.Time{}))
Expand Down
7 changes: 4 additions & 3 deletions data/time_series_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ package data
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 if possible")
ErrorInputFieldsWithoutRows = errors.New("can not convert to long series, input fields have no rows")
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 if possible")
ErrorInputFieldsWithoutRows = errors.New("can not convert to long series, input fields have no rows")
ErrorInputFieldsWithoutRowsWideSeries = errors.New("can not convert to wide series, input fields have no rows")
)