yujun777 commented on PR #68648:
URL: https://github.com/apache/doris/pull/68648#issuecomment-6258847499

   @foxtail463 You're right, and thanks for catching it.
   
   `MTMVRewriteUtil.getMTMVCanRewritePartitions()` already returns no partition 
when any PCT table has a default list partition, so 
`MTMVRelationManager.isMVPartitionValid()` rejects the MV and it never becomes 
a rewrite candidate. That also means `calcInvalidPartitions()` -- the only 
producer of the `mvPartitionsToRemove` map -- never runs for such an MV, so 
`mvPartitionsToReadThrough()` cannot be reached from any entry.
   
   Removed in 81eb6b5f412:
   - `mvPartitionsToReadThrough()` and the `isPctTable()` helper used only by 
it.
   - The `mvPartitionsToRemove` parameter chain through `PredicateAddContext`, 
`StructInfo.addFilterOnTableScan()` and `AbstractMaterializedViewRule`.
   
   The normal partition compensation and the whole-key pinning of a non-default 
partition's read are unchanged. `UpdateMvByPartitionCommandTest` (15 tests) 
passes.
   


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