Skip to content

fix(search): recurse into nested columns for columnDescriptionStatus (#32173) [2.0] - #32203

Merged
sonika-shah merged 2 commits into
2.0from
cherry/column-description-status-nested-2.0
Aug 30, 2026
Merged

sonika-shah merged 2 commits into
2.0from
cherry/column-description-status-nested-2.0

Conversation

@sonika-shah

@sonika-shah sonika-shah commented Aug 28, 2026 •

Copy link
Copy Markdown
Collaborator

Cherry-pick of #32173 to the 2.0 release branch.

Problem

The columnDescriptionStatus field powering the Explore Column Description filter (computed by ColumnIndex.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 as COMPLETE, so the filter reported it as fully documented. Both TableIndex and WorksheetIndex call this shared default method, so both were affected.

Fix

Walk the full column tree — COMPLETE only when every column at every depth has a description. The traversal is iterative (explicit Deque) 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 single O(N) early-exit pass.

Testing

ColumnIndexLimitTest (real ColumnIndex default method via a Table, no mocks): undocumented-nested ⇒ INCOMPLETE, all-documented ⇒ COMPLETE, and a 20,000-level deep chain handled without StackOverflowError. 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.

  • Adds a stack-safe deque traversal with early exit for undocumented columns.
  • Adds nested-column and deep-nesting regression coverage.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

No blocking failure remains.

Important Files Changed

Filename Overview
openmetadata-service/src/main/java/org/openmetadata/service/search/indexes/ColumnIndex.java Replaces top-level-only description checking with an iterative, null-tolerant traversal of the complete column tree.
openmetadata-service/src/test/java/org/openmetadata/service/search/indexes/ColumnIndexLimitTest.java Adds coverage for undocumented nested fields, fully documented trees, and extremely deep nesting.

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

Reviews (2): Last reviewed commit: "Merge branch '2.0' into cherry/column-de..." | Re-trigger Greptile

…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)
@sonika-shah
sonika-shah requested a review from a team as a code owner August 28, 2026 02:21
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Aug 28, 2026
@gitar-bot

gitar-bot Bot commented Aug 28, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Fixes columnDescriptionStatus indexing to recurse into nested struct columns, so tables with undocumented nested fields are correctly marked INCOMPLETE. The traversal uses an iterative deque approach to handle arbitrary nesting depth safely and efficiently at index time. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

}

private boolean hasUndocumentedColumn(List<Column> columns) {
boolean undocumented = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit e3cf7a17f3dd1117e8c09de8bdb2202e3ec4abc0 in Playwright run 33135650757, attempt 1.

✅ 1069 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

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

  • Common shard skew was 38.87% (convergence target: at most 15%).
  • Application boot ratio was 2.21 per UI scenario (2437 boots / 1102 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 157 0 0 0 0 0
✅ Shard chromium-02 147 0 0 0 0 0
🟡 Shard chromium-03 146 0 1 0 0 0
✅ Shard chromium-04 140 0 0 0 0 0
🟡 Shard chromium-05 155 0 2 0 0 0
🟡 Shard chromium-06 142 0 2 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 2 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 5 flaky test(s) (passed on retry)
  • Pages/ExploreBrowse.spec.ts › Tags leaf under Governance filters the results (shard chromium-03, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-05, 1 retry)
  • Pages/Glossary.spec.ts › Glossary & terms creation for reviewer as user (shard chromium-05, 1 retry)
  • Flow/MetricListSearch.spec.ts › typing in the search box filters the metric list server-side (shard chromium-06, 1 retry)
  • Pages/Glossary.spec.ts › Approve and reject glossary term from Glossary Listing (shard chromium-06, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@sonika-shah
sonika-shah merged commit 676bfbe into 2.0 Aug 30, 2026
21 of 24 checks passed
@sonika-shah
sonika-shah deleted the cherry/column-description-status-nested-2.0 branch August 30, 2026 05:04

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants