Fix quantile overflow: wrap p99 query with toInt64() for JDBC compat
quantile(0.99) returns Float64 which ClickHouse JDBC cannot cast to Long directly. Same toInt64() pattern already used in timeseries query. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -90,7 +90,7 @@ public class ClickHouseSearchEngine implements SearchEngine {
|
||||
@Override
|
||||
public ExecutionStats stats(Instant from, Instant to) {
|
||||
Long p99 = jdbcTemplate.queryForObject(
|
||||
"SELECT quantile(0.99)(duration_ms) FROM route_executions " +
|
||||
"SELECT toInt64(quantile(0.99)(duration_ms)) FROM route_executions " +
|
||||
"WHERE start_time >= ? AND start_time <= ?",
|
||||
Long.class, Timestamp.from(from), Timestamp.from(to));
|
||||
Long active = jdbcTemplate.queryForObject(
|
||||
|
||||
Reference in New Issue
Block a user