Skip to content
Open
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
3 changes: 2 additions & 1 deletion rules/update_field_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ func castToFloat(value tsm1.Value) (tsm1.Value, bool, error) {
case uint64:
return tsm1.NewFloatValue(value.UnixNano(), float64(value.Value().(uint64))), false, nil
case bool:
return nil, false, fmt.Errorf("Could not cast bool value to float")
b := value.Value().(bool)
return tsm1.NewFloatValue(value.UnixNano(), float64(btoi(b))), false, nil
case string:
v, err := strconv.ParseFloat(value.Value().(string), 64)
if err != nil {
Expand Down