Skip to content

Commit

Permalink
Merge pull request #22 from SigNoz/feat/migration-0.62-data
Browse files Browse the repository at this point in the history
fix: use int instead of uint
  • Loading branch information
nityanandagohain authored Dec 7, 2024
2 parents 744748c + 13e0f3c commit 624f875
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migration-0.62-data/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func connect(host string, port string, userName string, password string, databas
return conn, nil
}

func getCountOfTraces(conn clickhouse.Conn, startTimestamp, endTimestamp int64, tableName string) uint64 {
func getCountOfTraces(conn clickhouse.Conn, startTimestamp, endTimestamp int64, tableName string) int64 {
ctx := context.Background()
// Directly use the nanosecond timestamps in the query
q := fmt.Sprintf("SELECT count(*) as count FROM %s WHERE timestamp > fromUnixTimestamp64Nano(?) AND timestamp <= fromUnixTimestamp64Nano(?)", tableName)
Expand All @@ -141,7 +141,7 @@ func getCountOfTraces(conn clickhouse.Conn, startTimestamp, endTimestamp int64,
zap.S().Error(fmt.Errorf("error while getting count of traces. Err=%v \n", err))
return 0
}
return count
return int64(count)
}

// fetchBatch retrieves all data in the timerange
Expand Down

0 comments on commit 624f875

Please sign in to comment.