raghav-reglobe commented on issue #70553:
URL: https://github.com/apache/doris/issues/70553#issuecomment-6856301159

   An update on the fix, since the one I described under "Anything Else?" is 
not what the PR ends up doing.
   
   Adding the generated not-nulls to the filter that is already under the 
aggregate ended the loop, but a review found that it hides that filter from 
`InferFilterNotNull`, which skips a filter that holds a generated not-null. For 
some statements an outer join that used to become an inner join then stayed an 
outer join. #70554 now keeps the generated not-nulls in a filter of their own, 
as before, and makes `InferAggNotNull` read every filter in the chain under the 
aggregate. The bound and the per-pass timeout check in 
`TopDownVisitorRewriteJob` are as described above.
   
   The trigger is also wider than I wrote: the loop needs the filter directly 
under the aggregate to hold some, but not all, of the `IS NOT NULL` predicates 
that the aggregate's argument implies. So `SUM(CASE WHEN c IS NOT NULL AND d > 
0 THEN c + d END)` loops too, and so does a nested CASE. The same code is on 
branch-4.0 and branch-4.1.


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