ClickHouse Time Window Functions (Functions/FunctionsTimeWindow.h)

ClickHouse · src/Functions/FunctionsTimeWindow.h · c · Apache-2.0
database, analytics, lang:cpp

Implements tumbling and hopping time window functions like tumble and hop for analytical stream processing.

// Source: https://github.com/ClickHouse/ClickHouse | License: Apache-2.0 | Copyright 2016-2026 ClickHouse, Inc
// Provided via justclaw.it.com; keep this notice with the code.
#pragma once

#include <Core/DecimalFunctions.h>
#include <DataTypes/DataTypeInterval.h>
#include <Functions/IFunction.h>
#include <Common/DateLUT.h>
#include <Common/DateLUTImpl.h>


namespace DB
{

/** Time window functions:
  *
  * tumble(time_attr, interval [, timezone])
  * tumbleStart(window_id)
  * tumbleStart(time_attr, interval [, timezone])
  * tumbleEnd(window_id)
  * tumbleEnd(time_attr, interval [, timezone])
  * hop(time_attr, hop_interval, window_interval [, timezone])
  * hopStart(window_id)
  * hopStart(time_attr, hop_interval, window_interval [, timezone])
  * hopEnd(window_id)
  * hopEnd(time_attr

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key