[fix](jdbc) Reject unsupported scan column types before execution #71242
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #71242"
general
weight: 0.35
morrySnow
Background
JDBC catalogs expose external schemas that can include types Doris cannot read. Queries such as
COUNT()reference no source column, but a surviving scan still needs one column to preserve row counts. Logical column pruning and physical scan translation both select such fallback columns.What problem does this PR solve?
Issue Number: None
Related PR: #41548 (introduced the constant-projection path), #71243 (original scan guards on branch-4.2)
PR Type: Bugfix
Problem Summary:
COUNT()over an unsupported-only PostgreSQL table can sendUNSUPPORTEDmetadata to BE and abort it during descriptor construction. Reject those scans during logical validation, select readable fallback columns in both planning paths, and retain FE serialization and BE ingestion guards. Mixed schemas remain usable even when discarded subquery outputs contain unsupported types. Most changed lines add tests, including column-level authorization checks.Details
oid,name, andregnamespacereproduce the original crash. Nested fallback selection failures were reproduced with logical-plan tests.CountStarSmallestSlotTestandSlotDescriptorTestcover valid metadata; existing column-pruning and privilege tests lack unsupported fallback inputs. PostgreSQL catalog/type suites cover readable types and arrays containing NULL, without unsupported-only counts or column-restricted empty subqueries.branch-4.2; this review follow-up updates master only.branch-4.1shares the original path and is not fixed here; other release branches were not checked.Testing
test_pg_jdbc_unsupported_scan_types: 20 query expectations; actual result generation and comparison both passed without skips. Also covers supported projections, subquery aliases, source casts, eliminated scans, and queries after rejection.8f5b7d5. No BE code changed in this follow-up.Notes for Reviewers
Release note
JDBC queries that retain an unsupported scan column now report a descriptive error instead of crashing a BE. Queries using supported columns from mixed schemas continue to work.
Check List (For Author)
AI Disclosure