Timelaketimelake
DocsBenchmarksRoadmapSpecContribute
Apache 2.0 ·
Roadmap

DoneIn progressPlanned

Tables and storage

Done:1. Iceberg tablesDone:2. CommitsDone:3. Object-store catalogIn progress:4. Time-series table contractIn progress:5. File layout and encodingsIn progress:6. Last-value indexDone:7. One-request table state and version checksDone:8. Table format versions and upgradesDone:9. SettingsPlanned:10. Supplemental timestamps

Writing

Done:11. AppendsDone:12. Late data and dedup on readDone:13. Writes from WebAssemblyPlanned:14. Hot tier and seconds-fresh readsPlanned:15. BackfillIn progress:16. Import and migrationPlanned:17. DeletesPlanned:18. GDPR erasure

Maintenance

Done:19. CompactionIn progress:20. Maintenance runs, retention and expiry

Reading

In progress:21. Timelake readerDone:22. Block cacheDone:23. Filter pushdownDone:24. Pruning with long IN listsDone:25. Newest-first scansDone:26. Scans in series orderDone:27. Materialized rollups

SQL functions

In progress:28. Function libraryDone:29. Time buckets and gap fillingDone:30. Signal aggregatesDone:31. Downsampling with m4

Integrations

Planned:32. REST catalogPlanned:33. DuckDB extensionPlanned:34. Snowflake connectionPlanned:35. Multitenancy

Services

Planned:36. Ingestion and rulesPlanned:37. Data to eventsPlanned:38. Static read modelsPlanned:39. Computed metricsPlanned:40. Agent access with permission setsPlanned:41. Device syncPlanned:42. Edge gatewayPlanned:43. Server mode

Benchmarks

In progress:44. Benchmark harness: timebenchIn progress:45. Industrial IoT benchmarkPlanned:46. Agent benchmark

Background

ArchitectureDeployment and cost modelEmbedded engine: DataFusionLandscape and positioningLicense and open corePurpose and requirementsReleases
TimelaketimelakeThe open time-series lakehouse.
v0 · Apache 2.0 · Contribute · GitHubBuilt on Apache Arrow, Apache DataFusion, Apache Parquet, and Apache Iceberg.
DocsBenchmarksRoadmapSpecContribute

Spec 29 · SQL functions

Time buckets and gap filling

DoneUpdated 2026-10-19View on GitHub
Versions
0.1.0, unreleased
Roadmap
v0: a maintenance-free time-series table on S3, Time-series SQL
Related
27. Materialized rollups, 28. Function library

Summary

time_bucket groups readings into fixed-width buckets; the table function time_buckets(width, start, end [, origin]) lists every bucket of a range, empty ones included, to join readings against; and the window functions forward_fill, backward_fill and interpolate fill the empty ones. Together they give one row per bucket for charts and reports.

Design

  • time_bucket(width, time [, origin]) (also date_bin): fixed widths; built in v0. Rollups group by it (spec 27). Calendar buckets (months), offsets and time zones are not built.
  • time_buckets(width, start, end [, origin]) (pandas date_range): a table function returning one column, bucket, from the bucket holding start (aligned like time_bucket, to the Unix epoch or origin) to the last one starting before end. Arguments may be expressions (now() - INTERVAL '1 day'), folded before planning. At most 10 million buckets, a guard against a width typed in the wrong unit; months are rejected. Joined against a grouped query, it keeps empty buckets, which a window function then fills:
    SELECT b.bucket, forward_fill(h.temp) OVER (ORDER BY b.bucket) AS temp
    FROM time_buckets(INTERVAL '1 hour', now() - INTERVAL '1 day', now()) b
    LEFT JOIN (SELECT time_bucket(INTERVAL '1 hour', time) AS bucket, avg(temp) AS temp
               FROM iot.readings WHERE device = 'pump-7' GROUP BY 1) h ON h.bucket = b.bucket
  • forward_fill(x) (ffill), backward_fill(x) (bfill): window functions carrying the last (next) non-null value over nulls, in the window's order. interpolate(x [, t]): linear between the neighbouring non-null values, by row position or, given t, by time (pandas' linear and time). Rows before the first value (and, for backward_fill and interpolate, after the last) stay null. Each computes a whole partition at once (an index of the source row per output row, then one take): forward_fill over 10 M rows 0.26 s against DataFusion's last_value(x) IGNORE NULLS 3.6 s, backward_fill 0.27 s against first_value(x) IGNORE NULLS 0.37 s (bench/results/PERFORMANCE.md, P7 gap filling).

Open questions and issues

  • #59 Query: cap the number of time buckets

History

  • 2026-10-12: time_bucket in v0
  • 2026-10-19: time_buckets, forward_fill, backward_fill, interpolate; moved from SPEC.md into spec 24, then into this spec when the specs were regrouped one per feature.