v.22.4New Feature
Added INTERPOLATE Extension to ORDER BY with FILL
Added INTERPOLATE extension to the ORDER BY ... WITH FILL. Closes #34903. #35349 (Yakov Olkhovskiy).
Why it matters
The INTERPOLATE extension enhances theWITH FILL feature by enabling users to generate intermediate rows with interpolated values when filling gaps in ordered query results. This solves the problem of missing data points in time series or ordered datasets, providing smoother and more meaningful data interpolation for analysis and reporting.How to use it
Use theWITH FILL INTERPOLATE syntax alongside the ORDER BY clause in your SELECT queries. This instructs ClickHouse to fill missing values with interpolated data instead of gaps or default fill values. For example:SELECT
timestamp,
value
FROM
my_table
ORDER BY
timestamp WITH FILL INTERPOLATEThis will fill missing timestamps and compute intermediate
value fields via interpolation.