[fix](fe) Fix query profile ownership filtering and SQL retrieval #71280
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.46) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.46 · 479 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.369
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #71280"
general
weight: 0.35
morrySnow
Background
The FE v2 query APIs read retained profiles from ProfileManager. The query list uses a legacy HTTP column order, while the SQL endpoint reads the summary column order. Ordinary users are restricted to their own profiles; built-in root/admin users can view all profiles.
What problem does this PR solve?
Issue Number: None
Related PR: #19219 (introduced the summary layout used by the SQL endpoint), #43724 (introduced the current query_info layout)
PR Type: Bugfix
Problem Summary:
Both layouts were passed to a filter that treated column 1 as the owner. That column is an unfilled node field in query_info and the task type in the SQL endpoint. The SQL endpoint also returned column 3 (end time) instead of SQL. Resolve fields using each endpoint's column names so ownership filtering and SQL retrieval use the intended values. Most of the diff adds regression unit tests.
Details
Testing
git diff --checklocally and inspected the final diff.bash run-fe-ut.sh --run org.apache.doris.httpv2.rest.manager.QueryProfileActionTeston an isolated Linux development checkout with JDK 17: 14 tests, 0 failures, 0 errors, 0 skipped; BUILD SUCCESS; exit status 0. Both forwarding parameterizations passed.cf2e559dad2579f412dc6159d6b89925c89c40deplus the Jackson response-serialization test fix now included in this PR. Local and remote test-file SHA-256 matched (f6d1aec0507dee72e493b29ce1b2297d006fdcfc896d09517bf45331e76d590a).Release note
Fix FE v2 query profile APIs to filter records by their actual owner and return the query SQL instead of its end time, while preserving the existing response format.
Check List (For Author)
AI Disclosure