口径与基线复核
原能力
按渠道保留计数范围、观测时段和独立样本限制,标记口径变化。(细化版 p.6–7)
首选项目
DuckDB(MIT(核心))。 DuckDB
匹配范围
分段报表和 SQL 对齐窗口与计数范围。
源码
DuckDB · SinkResultType PhysicalHashAggregate::Sink(
src/execution/operator/aggregate/physical_hash_aggregate.cpp · 396–409 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
SinkResultType PhysicalHashAggregate::Sink(ExecutionContext &context, DataChunk &chunk,
OperatorSinkInput &input) const {
auto &local_state = input.local_state.Cast<HashAggregateLocalSinkState>();
auto &global_state = input.global_state.Cast<HashAggregateGlobalSinkState>();
if (distinct_collection_info) {
SinkDistinct(context, chunk, input);
}
if (CanSkipRegularSink()) {
return SinkResultType::NEED_MORE_INPUT;
}
DataChunk &aggregate_input_chunk = local_state.aggregate_input_chunk;
Matomo · public function getCategory(
plugins/Events/API.php · 229–242 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
public function getCategory($idSite, string $period, string $date, $segment = false, bool $expanded = false, $secondaryDimension = false, bool $flat = false)
{
return $this->getDataTable(__FUNCTION__, $idSite, $period, $date, $segment, $expanded, false, $secondaryDimension, $flat);
}
/**
* Returns event metrics grouped by event action.
*
* @param int|string|int[] $idSite Website ID(s) to query.
* - Single site ID (e.g. 1)
* - Multiple site IDs (e.g. [1, 4, 5])
* - Comma-separated list ("1,4,5") or "all"
* @param 'day'|'week'|'month'|'year'|'range' $period The period to process, processes data for the period
* containing the specified date.
实现与验收要点
定义对照版本、排除重复设备和区分口径变更。