Split from #11152 (retriage, 2026-08-23): half (a) — sum/avg boolean conformance cases, settled by #11065's precedent — stays on #11152 and is dispatchable. This card carries half (b), the genuinely unpinned contract question, which is 协议变化类别 ⇒ manual floor.
The question
When an aggregation query takes min or max over a boolean column, what JSON value does the platform contract promise?
- SQLite / the SQL family:
MIN(col)/MAX(col) over a boolean answer 0 / 1. - objectql's in-memory fallback (
in-memory-aggregation.ts) and driver-memory both reduce with </> and answer false / true.
Unlike #11065 (driver-memory was the lone outlier; two faces pinned the answer), here the two in-memory faces agree with each other and differ from SQL — precedent does not settle it. Whatever is chosen becomes the expected value in AGGREGATION_ROWS conformance cases and forces the losing side to convert.
[facets-block]
推荐 B(false/true,置信度高):四轴同向——契约按字段类型说话,SQL 驱动在聚合读出侧把 0/1 归一化为布尔;与布尔字段普通读取路径的既有归一化同族。本分析看不见什么:driver-sql 各方言布尔存储表示的现状差异(TINYINT/BOOLEAN/INTEGER),归一化实现成本以实测为准;PG 对 avg(boolean) 可能直接报错(#11152 half (a) 的实测项,读数会回贴该卡)。
裁决格式:回「A」(= 0/1,SQL 面答案为准)或「B」(= false/true,布尔类型面答案为准)。裁后:结论写进 #11152 的实施约束,min/max 案例随裁决入列;本卡关闭。
Related: #11152 (carrier of half (a)), #11065 (the avg cell that exposed the family), #11151 (driver-mongodb sibling, on hold).
Split from #11152 (retriage, 2026-08-23): half (a) —
sum/avgboolean conformance cases, settled by #11065's precedent — stays on #11152 and is dispatchable. This card carries half (b), the genuinely unpinned contract question, which is 协议变化类别 ⇒ manual floor.The question
When an aggregation query takes
minormaxover a boolean column, what JSON value does the platform contract promise?MIN(col)/MAX(col)over a boolean answer0/1.in-memory-aggregation.ts) anddriver-memoryboth reduce with</>and answerfalse/true.Unlike #11065 (driver-memory was the lone outlier; two faces pinned the answer), here the two in-memory faces agree with each other and differ from SQL — precedent does not settle it. Whatever is chosen becomes the expected value in
AGGREGATION_ROWSconformance cases and forces the losing side to convert.[facets-block]
0/1或false/true都能用,但两驱动答案不同就是同一查询两个结果,由调用方看不见的驱动能力位决定;真实需求是一致,不是哪个字面量。true/false;聚合结果突然变0/1是 SQL 存储表示的泄漏。选false/true让契约与字段类型系统自洽;选0/1则是让存储实现定义契约。=== true判断——0/1会静默永假。收敛到false/true(SQL 侧结果在驱动层归一化)是结构上更难写错的一侧。AGGREGATION_ROWShas no boolean column, so the cross-driver aggregation conformance family cannot see a boolean aggregand on any face #11152 的列一加,期望值必须写死。推荐 B(
false/true,置信度高):四轴同向——契约按字段类型说话,SQL 驱动在聚合读出侧把0/1归一化为布尔;与布尔字段普通读取路径的既有归一化同族。本分析看不见什么:driver-sql 各方言布尔存储表示的现状差异(TINYINT/BOOLEAN/INTEGER),归一化实现成本以实测为准;PG 对avg(boolean)可能直接报错(#11152 half (a) 的实测项,读数会回贴该卡)。裁决格式:回「A」(=
0/1,SQL 面答案为准)或「B」(=false/true,布尔类型面答案为准)。裁后:结论写进 #11152 的实施约束,min/max 案例随裁决入列;本卡关闭。Related: #11152 (carrier of half (a)), #11065 (the
avgcell that exposed the family), #11151 (driver-mongodb sibling, on hold).