Skip to content

Commit

Permalink
fix: substring correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
catalyst17 committed Dec 20, 2024
1 parent 996d70b commit 1ab5a4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/storage/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ func addFilterParams(key, value, query string) string {
suffix := key[len(key)-3:]
switch suffix {
case "gte":
query += fmt.Sprintf(" AND %s >= '%s'", key[:len(key)-3], value)
query += fmt.Sprintf(" AND %s >= '%s'", key[:len(key)-4], value)
case "lte":
query += fmt.Sprintf(" AND %s <= '%s'", key[:len(key)-3], value)
query += fmt.Sprintf(" AND %s <= '%s'", key[:len(key)-4], value)
case "_lt":
query += fmt.Sprintf(" AND %s < '%s'", key[:len(key)-3], value)
case "_gt":
Expand Down

0 comments on commit 1ab5a4e

Please sign in to comment.