englefly commented on PR #68340: URL: https://github.com/apache/doris/pull/68340#issuecomment-5771864402
All three inline comments are addressed in `0673ee65e66` (thanks for the detailed traces). **[P1] NULL semantics are now part of the filter identity.** `FilterIdentity` carries the mode the legacy translation derives from the builder (`planner.RuntimeFilter`: an `EQ_FOR_NULL` hash join conjunct, or a set operation), computed by `isNullAware()`. Two filters which differ in it are no longer grouped, so the ordinary `=` filter of the deeper consumer can no longer replace the null aware `<=>` filter of the upper one. Verified end to end on the shape of the reported tree (`t c1 JOIN (t c2 RIGHT OUTER JOIN b ON c2.k = b.x) ON c1.k <=> s.x`, NULLs on both sides, `runtime_filter_type=12`): the filters stay on the branch sinks, the producer scan gets none, and the query returns the row which matches NULL with NULL. Covered by `RuntimeFilterTest#testDoNotPushFiltersWithDifferentNullSemantics` (mock level) and by the new `shared_cte_null_aware` case of the regression suite (NULL data, ordered result). **[P2] Plan level oracle added.** `testPushSharedCteRuntimeFilterIntoTheProducer` and `testDoNotPushSingleConsumerCteRuntimeFilterIntoTheProducer` plan a real query, run the post processors and assert on the runtime filters installed **on the relations inside the CTE producers**: the filter every consumer applies reaches the producer *and* is removed from the consumer it was built for, while the opposite-direction MIN/MAX filters of a single consumer do not reach it. This closes the gap where the producer insertion, the original-filter cleanup and the translation could regress unnoticed. **[P2] Log level lowered.** The skip is now logged at DEBUG in `selectPushableRuntimeFilters`; it is a normal planner decision that no operator can act on. Test status: `RuntimeFilterTest` 40/40 (was 37), `nereids_rules_p0/cte/test_cte_shared_producer_min_max_runtime_filter` passes (five ordered cases, now including the NULL/right-outer one), TPC-DS q95 with `runtime_filter_type=12` still installs the same four runtime filters on the inner scan of its CTE body with an unchanged result, and the reported case still returns 4 rows instead of 0. -- 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]
