nsivarajan opened a new pull request, #63974:
URL: https://github.com/apache/doris/pull/63974

   
   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #63067, #63768 
   
   **Problem Summary:**
   
   Follow-up of Part 2 (#xxx). Extends column-level query/filter hit recording 
to cover the constructs that were explicitly deferred from Part 2, plus 
additional cases discovered during full plan-node audit:
   
   **Deferred from Part 2 (now resolved):**
   
     - UNION / INTERSECT / EXCEPT — 
PhysicalSetOperation.getRegularChildrenOutputs() maps each child branch's slots 
to queryHit
     - CTE columns — PhysicalCTEProducer child is walked explicitly before 
sibling nodes so scan slots are registered; PhysicalCTEConsumer maps 
consumer-side ExprIds to producer scan slots
     - LATERAL VIEW / EXPLODE — PhysicalGenerate generator input columns 
recorded as queryHit
     - HAVING SUM(k2) > 0 — single-input aggregate output ExprId is mapped to 
the underlying scan so a parent PhysicalFilter records filterHit on k2
   
   **Additional gaps closed by full plan-node audit:**
   
     - HAVING SUM(k2+k3) > 0 — multi-input aggregate outputs populate 
aggOutputToInputSlots; recordInputSlotsAsFilterHit expands to all contributing 
columns
     - Mark join conjuncts — AbstractPhysicalJoin.getMarkJoinConjuncts() is a 
separate field not included in hash or other conjuncts; adds filterHit for 
IN/EXISTS subquery correlation columns
     - Recursive CTE — PhysicalRecursiveUnion extends PhysicalBinary (not 
PhysicalSetOperation); dedicated handler calls getRegularChildrenOutputs() so 
base-case columns get queryHit; recursive-case WorkTableReference
      slots are silently skipped
     - Computed SELECT expressions — SELECT k1+k2 AS result now records 
queryHit on both k1 and k2 via the multi-input branch of the PhysicalProject 
alias handler, consistent with how ORDER BY k1+k2 and GROUP BY k1+k2
      already behave
   
   **Out of scope (intentional):**
     - External tables (Hive / Iceberg / JDBC / ODBC) — OlapTable-only by design
   
   ### Release note
   
   Extend QueryStatsRecorder to cover UNION/INTERSECT/EXCEPT, CTE (inline and 
materialized), LATERAL VIEW/EXPLODE, HAVING on aggregate expressions (single 
and multi-input), IN/EXISTS mark join predicates, recursive CTEs, and computed 
SELECT expressions — completing full OlapTable column-level query/filter hit 
coverage.
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [x] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [x] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes. <!-- Add document PR link here. eg: 
https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should 
merge into -->
   
   


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