You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/05 04:15:26 UTC

[GitHub] [doris] nextdreamblue commented on issue #14811: [Bug] agg table and unique table get different result when enable_vectorized_engine=false

nextdreamblue commented on issue #14811:
URL: https://github.com/apache/doris/issues/14811#issuecomment-1336727961

   初步分析:
   
   这个地方和行存处理replace聚合的逻辑有关
   
   向量化_agg_key_next_block处理replace是先处理的第一行就是最终行,后续有相同key的值,replace的逻辑是
   if (this->has_set_value()) {
               return;
           }
   有值了就直接丢弃后续的行
   
   非向量化_agg_key_next_row是先获取理论上丢弃的行,然后依次用后续行的值覆盖之前的值,最终处理完所有相同key的行就会得到最终replace的值
   这种情况在处理一个rowset有多个segment,每个segment都有相同key的时候,会把相同key的segment_id小的放到后边处理,导致segment小的行的值会覆盖segment_id大的行,导致repalce的最终结果是返回了一个segment_id小的value
   
   而unique表,把同一个rowset下segment_id小的行置为set_need_skip(true),后续就直接把这类行淘汰了,最终返回的就是segment_id更大的value
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org