Repository navigation
fix(search): recurse into nested columns for columnDescriptionStatus - #32173
Conversation
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.
❌ 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 |
…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.
…nStatus 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.
Code Review ✅ Approved 1 resolved / 1 findingsUpdates ✅ 1 resolved✅ Edge Case: Description status ignores maxColumns cap unlike parseColumns
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 |
✅ Playwright Results — workflow succeededValidated commit ✅ 939 passed · ❌ 0 failed · 🟡 3 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) 53m 54s ⏱️ Max setup 5m 2s · max shard execution 16m 25s · max shard-job elapsed before upload 20m 55s · reporting 6s 🌐 206.95 requests/attempt · 2.39 app boots/UI scenario · 22.03% common-shard skew Optimization targets still in progress:
🟡 3 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 |
|
Failed to cherry-pick changes to the 1.13 branch. |
|
Failed to cherry-pick changes to the 2.0 branch. |
…32173) (#32203) * 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)
…32173) (#32202) * 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)
Fixes #32184
Problem
The
columnDescriptionStatusfield powering the Explore Column Description filter is computed byColumnIndex.getColumnDescriptionStatus(), which only iterated the top-level columns and never descended into nested/struct children (col.getChildren()).As a result, a table whose top-level columns are documented but whose nested struct fields are all undocumented was indexed as
COMPLETE— so the filter reported it as fully documented even though every field inside the nested column had no description.Both
TableIndexandWorksheetIndexcall this shared default method, so both were affected.Fix
Walk the full column tree. A table/worksheet is
COMPLETEonly when every column at every depth has a description; the first column (top-level or nested) with an empty description makes itINCOMPLETE.The traversal is done iteratively with an explicit
Dequerather than recursion:Why a
Dequeinstead of recursion?StackOverflowError. Recursion uses one JVM call-stack frame per nesting level, so a pathologically deep column tree could overflow the stack. An explicitDequekeeps the traversal state on the heap, so it is safe at any depth — without imposing an artificial depth cap.mappingDepthLimit. That limit exists for the paths that emit nested fields into the ES document (parseColumns,flattenColumns,SchemaFieldFlattener) so the doc doesn't exceedindex.mapping.depth.limit. This method emits a single scalar keyword (adds no depth), so it should reflect the true documentation state of all columns.O(N)pass that early-exits at the first undocumented column, and sits next toparseColumns, which already walks the same tree. So there is no measurable impact on API latency or large-table indexing.Testing
Regression tests in
ColumnIndexLimitTestexercise the realColumnIndexdefault method via aTable(no mocks):columnDescriptionStatus_incomplete_when_nested_child_undocumented— documented struct parent + undocumented child ⇒INCOMPLETE(fails without the fix:expected: <INCOMPLETE> but was: <COMPLETE>).columnDescriptionStatus_complete_when_all_nested_documented— every column and nested child documented ⇒COMPLETE.columnDescriptionStatus_handles_deep_nesting_without_stack_overflow— a 20,000-level deep chain is fully traversed and detected without aStackOverflowError.Full class green (
Tests run: 9, Failures: 0).Greptile Summary
The PR updates column-description status indexing to inspect nested column trees without recursive stack growth.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Table or worksheet columns] --> B[Push columns onto deque] B --> C{Deque empty?} C -- Yes --> D[Status COMPLETE] C -- No --> E[Pop next column] E --> F{Description empty?} F -- Yes --> G[Status INCOMPLETE] F -- No --> H[Push child columns] H --> CReviews (3): Last reviewed commit: "fix(search): traverse nested columns ite..." | Re-trigger Greptile