Repository navigation
Fixes #30677: Keep topic schema order explicitly and restore the Name sort on reload - #37902
Merged
Merged
Conversation
- Topic field endpoints accept sortBy=schema to return fields in stored order; the Schema tab sends it instead of relying on ordinalPosition ties. - The Name sort is kept in the URL (fieldSort) with the page and search, so a reload returns the same rows. - Amend ADR:2026-11-16-topic-schema-field-search-returns-flat-rows (v2). (cherry picked from commit 40c215a)
Closed
13 of 14 tasks
Code Review ✅ Approved 🟡 Medium riskExplicit schema sorting changes topic field order before pagination; a mismatch could show fields on the wrong page or in an unintended order. Topic schema field endpoints now accept VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
mohityadav766
approved these changes
Nov 16, 2026
Rohit0301
enabled auto-merge (squash)
November 16, 2026 13:57
chirag-madlani
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes:
Fixes #30677
Follow-up to #37862 (merged). It fixes two review findings raised on the 2.1 backport #37900, which carries the same commit:
/columnssorts by name by default, and Fixes #30677: Paginate topic schema fields from the server #37862 kept stored order by sendingsortBy=ordinalPosition. That only worked because topic fields have no ordinal position, so every field tied under a stable sort. Both topic field endpoints (/columnsand/columns/search) now acceptsortBy=schema, which skips sorting. The Schema tab always sendssortBy=schemaorsortBy=name. The/columnsdefault staysnamefor existing API clients.fieldSort=asc|desc, next to the page andcolumnSearch.ADR:2026-11-16-topic-schema-field-search-returns-flat-rows gets a v2 amendment recording the rule.
Type of change:
High-level design:
N/A — small change.
TopicResourcemapssortBy=schemato "no sort" before paging (the sharedChildFieldPageReaderalready keeps stored order for a nullsortBy). In the UI,topicsAPI.tsalways sends an explicit sort, andTopicSchema.tsxreads the Name sort fromuseTableFilters(fieldSort). Allowed values live inTopicSchema.constants.ts.Tests:
Use cases covered
/columns?sortBy=schemareturns stored order; the default still sorts by name.Unit tests
TopicSchema.test.tsx— 16 passed (new:restores the name sort from the URL on reload; the server-sort click test is updated).tscis clean for the changed files, and the CI formatter sequence leaves no diff.Backend integration tests
TopicResourceIT.schemaFieldPage_schemaSortKeepsStoredOrderreplaces the ordinalPosition test. It asserts stored order withsortBy=schemaand name order with nosortBy.Ran locally on
main(mysql-elasticsearch, parallel lane):mvn -B verify -pl :openmetadata-integration-tests -am -Pmysql-elasticsearch -DintegrationTests.lane=parallel -Dit.test=TopicResourceIT→ PASSED — 260 tests, 0 failures, 0 errors, 21 skipped. The same suite passed on2.1for #37900.Not run locally (pending, merge queue): the rest of the impacted plan.
Ingestion integration tests
Playwright (UI) tests
Not run locally (merge queue).
Visual regression baselines
Manual testing performed
Covered by the integration and Jest tests above. The UI change is limited to which sort param is sent and where the Name sort is stored.
UI screen recording:
Not applicable: this fixes sort parameters and URL state on the feature recorded in #37862.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Makes topic field ordering explicit and keeps the Name sort after reload.
Reviews (1) · Last reviewed commit: "Keep topic schema order explicitly and r..." · Reviewed by Greptile