linrrzqqq commented on code in PR #65847:
URL: https://github.com/apache/doris/pull/65847#discussion_r3653075629


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/combinator/MergeCombinator.java:
##########
@@ -117,6 +117,12 @@ public boolean canRollUp() {
 
     @Override
     public void checkLegalityBeforeTypeCoercion() {
-        nested.checkLegalityBeforeTypeCoercion();
+        // A directly nested state retains the original value expressions, so 
their legality
+        // checks are still meaningful. After a subquery or stored-column 
boundary, the nested
+        // function is rebuilt with mocked slots from AggStateType; replaying 
value-expression
+        // checks there would reject valid states whose constants are already 
serialized.
+        if (getArgument(0) instanceof StateCombinator) {

Review Comment:
   如果真搞一个无效的类型,比如`AGG_STATE<max(BITMAP)>`,  那么其实这个列本身就没有意义,无法计算序列化的结果,后续 merge 
/union 的 check 也没什么太大的意义了, 这个 pr 只是负责支持函数`percentile_approx_array`, 
让其能够正常执行,这个评论应该涉及到后续 Combinator 部分的一些类型检查的规范工作,不在这个 pr 的职责范围之内



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