和顺 / 知白 返回所属 Agent
ZB-04.02

触发时刻对照

原能力

并列情绪变化前后的事件和原话,让当事人检查二者是否真的相关。(细化版 p.2–3)

首选项目

DuckDB(MIT(核心))。 DuckDB

匹配范围

按事件 ID 和时点并列变化前后的已录入表达。

源码

DuckDB · void WindowAggregateExecutor::EvaluateInternal(

src/function/window/window_aggregate_function.cpp · 254–265 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
void WindowAggregateExecutor::EvaluateInternal(ExecutionContext &context, DataChunk &eval_chunk, DataChunk &bounds,
                                               Vector &result, idx_t row_idx, OperatorSinkInput &sink) const {
	auto &gastate = sink.global_state.Cast<WindowAggregateExecutorGlobalState>();
	auto &lastate = sink.local_state.Cast<WindowAggregateExecutorLocalState>();
	auto &gsink = gastate.gsink;
	D_ASSERT(aggregator);

	OperatorSinkInput asink {*gsink, *lastate.aggregator_state, sink.interrupt_state};
	aggregator->Evaluate(context, bounds, result, bounds.size(), row_idx, asink);
}

} // namespace duckdb

实现与验收要点

时间不可靠时保留不确定关联,邀请本人核对,不能从相邻推出因果。