和顺 / 明行 返回所属 Agent
MX-06.03

预算余量

原能力

记录价格不确定性与应急预算,说明哪些差额需经旅行者确认。(细化版 p.10–11)

首选项目

DuckDB(MIT(核心))。 DuckDB

匹配范围

按已录入报价、费用和上限计算剩余预算。

源码

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;

实现与验收要点

汇率出处、区间及有权旅行者确认与临时例外。