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

   第 4~6 批完成(三个 commit):
   
   **`bbeffc205dc` — 身份模式字面量编码 + `limit/topn`/`Generate`/`Repeat`/set-op**
   - 规则:**凡是改变行数的东西都进身份,且带数值的绝不折叠**(两种模式写同一文本);只影响顺序/呈现的不进身份。
   - `TopN`/`Limit` → `T{limit,offset}` / `L{limit,offset}`;`Generate` → 
`G{tf:[函数(参数…)]}`(参数用字面量形式,`split(x,',')` ≠ `split(x,';')`,`_outer` 
由函数名区分);`Repeat` → `R{gs:[[…];[…]]}`(集合顺序保留、集合内排序;group key 
里的常量不改变组数,折叠安全);set-op → `U|I|E{qualifier,cols:[…]}(branches)`(qualifier 
与**比较列**都进身份;分支排序,`Except` 保留首孩子=被减数、其余减数排序)。
   - 顺带修掉一个**我在第 2 批引入的真 bug**:algebra 里 `TopN extends Sort`,所以把分派从 
`LogicalSort` 改成接口 `Sort` 之后,TopN 被当成了"保行数透明算子"(行数会丢);现在 TopN 单独成支。另:`Repeat 
extends Aggregate`,因此 Repeat 分支必须排在 Aggregate 之前。
   
   **`9c5ea391bb9` — 链信息记忆化(O(n²)→O(n))**
   - 每条链的 `{conditions WL/NL, 成员 groups, 叶子 groups}` 按 group 
记忆化(`GroupStructInfo.ChainInfo` 存在 group 上),父链由子链的缓存归并;链只走一次。
   - 链结构不依赖"谁在读它",只有"子树是否被重复到达"的簿记依赖构建:这部分放在组合链时做(标记成员 visited、被复用的链的所有叶子标 
repeated → 文本写两遍、scans 只继承一次)。
   
   **`45d7943ef54` — J/A key 常量敏感**
   - join/agg 现在同时记录/打印/查找**字面量形式**的键:注解打印 `with_literal` 与 `no_literal` 
两条可注入条目,读侧**优先查字面量键、回退常量无关键**(旧条目继续生效)。这样"我测的是 `b = 5`"就只对 `b = 5` 生效。
   
   验证:三个 commit 均编译通过、`GroupStructInfoCompositionTest` 4/4 通过。**仍未做端到端复验**:本机 
BE 一直注册为 `Alive=false`(心跳停了),现在连 `explain` 都被拒(`No available backends for 
compute group`),所以建表、注解逐字节 diff、`query_p0/hbo` 套件都做不了。BE 恢复后请跑:
   ```bash
   ./run-regression-test.sh --run -d query_p0/hbo -s hbo_show_statistics_test
   bash /tmp/hbo_capture.sh > /tmp/hbo_after.txt && diff /tmp/hbo_before.txt 
/tmp/hbo_after.txt
   ```
   预期:除新增/变化行外无回归;`order by … limit 10` 的 join 恢复 `type=exact`;CTE 
双消费者可用;`limit/topn`、`Generate`、`Repeat`、set-op 在其上层 join/agg 
的描述里出现新身份(`T{}`/`L{}`/`G{}`/`R{}`/`U|I|E{}`);join/agg 多一条 `with_literal` 可注入条目。
   


-- 
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