Repository navigation
fix(search): recurse into nested columns for columnDescriptionStatus (#32173) [2.0] - #32203
Conversation
…32173) * fix(search): recurse into nested columns for columnDescriptionStatus getColumnDescriptionStatus() only iterated top-level columns and never recursed into nested/struct children (col.getChildren()). A table whose top-level columns were documented but whose nested struct fields were all undocumented was indexed as COMPLETE, so the Explore "Column Description" filter reported it as fully documented. Recurse through the column tree so a table (or worksheet) is COMPLETE only when every column at every depth has a description. * fix(search): bound nested columnDescriptionStatus recursion by depth limit Honor SearchFieldLimits.getDepthLimit() in the recursive description-status traversal, matching parseColumns in the same file. Columns beyond the indexing depth limit are not indexed anyway, so they no longer affect the computed status, and the recursion can no longer exceed the configured depth. * fix(search): traverse nested columns iteratively for columnDescriptionStatus Replace the depth-limit-bounded recursion with an explicit-stack (Deque) traversal. This evaluates every column at every depth (no cap, so the status stays a true documentation-completeness signal) while making StackOverflowError impossible regardless of nesting depth. The deque holds column references only (a few MB at worst for very wide tables), not copies, so it is safe at scale. (cherry picked from commit f211242)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ ApprovedFixes OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| } | ||
|
|
||
| private boolean hasUndocumentedColumn(List<Column> columns) { | ||
| boolean undocumented = false; |
There was a problem hiding this comment.
Non-final traversal declarations
The new helper parameters, deque reference, and test fixtures omit final even though they are never reassigned, weakening the repository's explicit immutability convention and allowing accidental reassignment. Apply final consistently here and across the other newly introduced unchanged declarations.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
✅ Playwright Results — workflow succeededValidated commit ✅ 1069 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 49m 56s ⏱️ Max setup 3m 1s · max shard execution 19m 10s · max shard-job elapsed before upload 22m 24s · reporting 9s 🌐 195.92 requests/attempt · 2.21 app boots/UI scenario · 38.87% common-shard skew Optimization targets still in progress:
🟡 5 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Cherry-pick of #32173 to the
2.0release branch.Problem
The
columnDescriptionStatusfield powering the Explore Column Description filter (computed byColumnIndex.getColumnDescriptionStatus()) only iterated top-level columns and never descended into nested/struct children (col.getChildren()). A table whose top-level columns are documented but whose nested struct fields are all undocumented was indexed asCOMPLETE, so the filter reported it as fully documented. BothTableIndexandWorksheetIndexcall this shared default method, so both were affected.Fix
Walk the full column tree —
COMPLETEonly when every column at every depth has a description. The traversal is iterative (explicitDeque) rather than recursive, so it is stack-safe at any nesting depth and holds only column references (no copies), keeping it cheap on very wide tables. It runs at index time (not the query/API path) as a singleO(N)early-exit pass.Testing
ColumnIndexLimitTest(realColumnIndexdefault method via aTable, no mocks): undocumented-nested ⇒INCOMPLETE, all-documented ⇒COMPLETE, and a 20,000-level deep chain handled withoutStackOverflowError. Full class green (Tests run: 9, Failures: 0) built and run against this branch.Original PR: #32173
Greptile Summary
The PR updates column-description status indexing to inspect nested column trees iteratively, allowing tables and worksheets with undocumented nested fields to be classified as incomplete.
Confidence Score: 5/5
The PR appears safe to merge because no blocking failure remains.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Receive entity] --> B{Implements ColumnsEntityInterface?} B -- No --> C[Return COMPLETE] B -- Yes --> D[Push top-level columns onto deque] D --> E{Deque empty?} E -- Yes --> C E -- No --> F[Pop column] F --> G{Description empty?} G -- Yes --> H[Return INCOMPLETE] G -- No --> I[Push child columns] I --> EReviews (2): Last reviewed commit: "Merge branch '2.0' into cherry/column-de..." | Re-trigger Greptile