Skip to content

Commit

Permalink
fix: add a missing item to the switch in the comparison operation (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
i-sevostyanov authored Jun 13, 2024
1 parent 3481713 commit a51f51c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/sql/expr/comparison/greater_or_equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func GreaterOrEqual(left, right sql.Value) (sql.Value, error) {
return greaterOrEqual[float64](left, right), nil
case sql.Text:
return greaterOrEqual[string](left, right), nil
case sql.Null:
return datatype.NewNull(), nil
}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/sql/expr/comparison/greater_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func GreaterThan(left, right sql.Value) (sql.Value, error) {
return greaterThan[float64](left, right), nil
case sql.Text:
return greaterThan[string](left, right), nil
case sql.Null:
return datatype.NewNull(), nil
}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/sql/expr/comparison/less_or_equal.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func LessOrEqual(left, right sql.Value) (sql.Value, error) {
return lessOrEqual[float64](left, right), nil
case sql.Text:
return lessOrEqual[string](left, right), nil
case sql.Null:
return datatype.NewNull(), nil
}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/sql/expr/comparison/less_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func LessThan(left, right sql.Value) (sql.Value, error) {
return lessThan[float64](left, right), nil
case sql.Text:
return lessThan[string](left, right), nil
case sql.Null:
return datatype.NewNull(), nil
}
}

Expand Down

0 comments on commit a51f51c

Please sign in to comment.