englefly commented on PR #67549:
URL: https://github.com/apache/doris/pull/67549#issuecomment-6145540772

   **套件复验抓到一个真回归,已修复**(commit 见下)——这正是跑套件的价值。
   
   **回归**:第 2 批"用选中(物理)表达式描述 group"改变了某些 group 的 key。`count(*)` over join 
的物理计划是两阶段聚合,于是外层聚合的串从 `A{gb:}(J{...})` 变成 
`A{gb:}(A{gb:}(J{...}))`,`hbo_struct_group_level_test`(断言 `T1⋈T2⋈T3` 与 
`T1⋈(T2⋈T3)` 的链与聚合必须共用同一 struct/指纹)因此失败;更严重的是**改动前注入的条目会失配**。
   
   **顺带发现的第二个坑**:`Group#getFirstLogicalExpression()` 在 group 只有物理表达式时会**直接抛** 
`There should be more than one Logical Expression in 
Group`(消息有误导),描述过程会把它抛到优化路径上。
   
   **修法**:**logical 优先,选中表达式只作兜底**——先描述 logical 形式,只有它无法描述时(例如未被选中的 TopN 
下推形态)才改用选中表达式。这样 group 的 key 保持稳定,同时保住可描述性的收益;另外新增 `firstLogicalExpression`(不 
assert)并按组状态报错。
   
   **验证**:`hbo_struct_group_level_test` **已通过** ✓;实测两阶段聚合的 `[133]`/`[135]` 
指纹重新相同(`4a03ae6b...`),左深/右深分组在 join 与 aggregation 上指纹一致 ✓;单测 7/7 ✓。
   
   **仍待处理**
   1. `hbo_filter_fingerprint_granularity_test` 仍失败:期望 `47eaaedf...`、实际 
`9c9091d7...`(带 filter 的 join 查询)。下一轮要找这个期望值的来源(suite 
里没有这个字面量,可能在读取/计算路径上),判断是"形状确实变了需要更新期望"还是又一个回归。
   2. `order by … limit` 的 join 只有 `join_expansion` 行且无 reason → 该物理节点的 group 
根本解析不出来(`resolveGroup` 返回 null),下一轮查物理计划里 join 节点的 group 回引/`KEY_GROUP` 为何缺失。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to