zclllyybb commented on issue #65423:
URL: https://github.com/apache/doris/issues/65423#issuecomment-4924794680

   Breakwater-GitHub-Analysis-Slot: slot_680cef225156
   This content is generated by AI for reference only.
   
   Initial triage:
   
   I checked the live issue and the current Doris code. The issue has no 
labels, no comments, and no concrete reproduction sequence/output yet, so the 
exact affected build and SQL shape are still missing.
   
   Code-path finding:
   
   On current upstream `master` as refreshed today (`2287a7e4686`), this is no 
longer simply missing for Nereids. `NereidsPlanner` calls 
`QueryStatsRecorder.record(physicalPlan, statementContext)` after physical 
planning, and `QueryStatsRecorder` records column query hits/filter hits from 
Nereids physical OLAP scans, filters, joins, group/order/window keys, 
aggregates, lazy materialization, etc. The regression suite 
`regression-test/suites/query_p0/stats/query_stats_test.groovy` also enables 
`enable_nereids_planner=true` and asserts non-zero `show query stats` results 
for simple select/where, select+filter on different columns, alias, group by, 
order by, join, and window cases.
   
   The branch-sensitive part is important: in refreshed `upstream/branch-4.1` 
and `upstream/branch-4.0`, I do not see the `QueryStatsRecorder` hook/class in 
the Nereids planner path. In those branches, the query/filter stats storage 
classes exist, but Nereids-planned SELECTs do not have the current master 
recorder call, so `show query stats` returning 0 is expected for that code 
line. The relevant fixes are already merged to master as #63067 and #63768.
   
   Immediate checks for the reporter/maintainers:
   
   1. Please provide the exact Doris version/branch/commit or Docker image. If 
this is a 4.0/4.1 release build or a build before #63067/#63768, the next 
action is to upgrade or backport those PRs.
   2. If the cluster has multiple FEs, retry with `admin set all frontends 
config ("enable_query_hit_stats" = "true");`. The issue uses `admin set 
frontend config`, while the current regression uses `all frontends`; a query 
routed through another FE with the config still disabled can still show 0.
   3. Please attach a minimal reproducible SQL sequence: `CREATE TABLE`, 
`INSERT`, `clean all query stats`, the query being tested, and the exact `show 
query stats from <table>` / `show query stats from <table> all verbose` output.
   4. Please include whether query cache is enabled. The current regression 
disables `enable_query_cache`, so that should also be controlled when 
reproducing.
   5. If the failure is on current master after the above checks, please 
include `EXPLAIN SHAPE PLAN` for the query and FE logs containing any `Failed 
to record query stats` warning.
   
   Known current-master limitations from #63768 are still relevant: set 
operations (`UNION`/`INTERSECT`/`EXCEPT`), CTE consumer columns, `LATERAL 
VIEW`/`EXPLODE`, aggregate-output `HAVING` predicates, and external tables were 
explicitly left out of scope. If the failing query uses one of those shapes, it 
should be tracked as a remaining coverage gap rather than the general Nereids 
recorder being absent.
   


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