diff --git a/input_definition.go b/input_definition.go index 56b5d7705..40b8451b8 100644 --- a/input_definition.go +++ b/input_definition.go @@ -346,12 +346,6 @@ func HandleAction(a Action, value interface{}, colID uint64) (*Bit, error) { } else { // value is not True. return nil, err } - case float64: - if value.(float64) >= 1 { - bit.RowID = *a.RowID - } else { // value is not True. - return nil, err - } default: return nil, fmt.Errorf("single-row-boolean value %v must equate to a Bool", value) } diff --git a/input_definition_test.go b/input_definition_test.go index 8adcbc1cc..595f57f10 100644 --- a/input_definition_test.go +++ b/input_definition_test.go @@ -179,17 +179,10 @@ func TestHandleAction(t *testing.T) { t.Fatalf("Expected Unrecognized Value Destination error, actual error: %s", err) } - value = float64(1.5) + value = float64(1) b, err = pilosa.HandleAction(action, value, colID) - if b != nil { - if b.RowID != 100 { - t.Fatalf("Unexpected rowID %v", b.RowID) - } - } - value = float64(0) - b, err = pilosa.HandleAction(action, value, colID) - if b != nil { - t.Fatalf("Expected Ignore values that do not equate to True") + if !strings.Contains(err.Error(), "must equate to a Bool") { + t.Fatalf("Expected Unrecognized Value Destination error, actual error: %s", err) } value = false @@ -204,6 +197,9 @@ func TestHandleAction(t *testing.T) { if b.ColumnID != 0 { t.Fatalf("Unexpected ColumnID %v", b.ColumnID) } + if b.RowID != 100 { + t.Fatalf("Unexpected rowID %v", b.RowID) + } } action.ValueDestination = pilosa.InputValueToRow