yuqi1129 opened a new pull request, #13920: URL: https://github.com/apache/gravitino/pull/13920
Cherry-pick Information: Original PR: #12767 ([#12764] fix(doris): preserve defaults when adding columns) Tracking issue: #12764 Target branch: branch-1.3 Status: ⚠️ Conflicts resolved in tests only (main source applied cleanly) ### What changes were proposed in this pull request? Backport of #12767. The Doris catalog now writes `DEFAULT` into the generated `ADD COLUMN` SQL, with version-aware escaping for string literals. The two main source files apply unchanged. Conflict resolution, tests only: - `CatalogDoris3xIT` / `CatalogDoris4xIT`: only the add-column default tests from #12767 are added; tests from other main-only commits that were in the conflict context are left out. `jdbcUrl` becomes a field, as on main, and the JDBC/assertion imports the new tests need are added. - `TestDorisTableOperationsSqlGeneration`: keep both the existing `DorisExceptionConverter` import and the new `DorisColumnDefaultValueConverter` import. ### Why are the changes needed? On branch-1.3, `alterTable` with an `addColumn` that carries a default value succeeds, but the column has no default in Doris. A `NOT NULL` column without a default is also rejected by Doris. Fix: #12764 ### Does this PR introduce _any_ user-facing change? Yes. Same as #12767: Doris `ADD COLUMN` now keeps the requested default value. ### How was this patch tested? - `./gradlew :catalogs:catalog-jdbc-doris:test -PskipITs` - `./gradlew :catalogs:catalog-jdbc-doris:test -PskipDockerTests=false -PdorisMultiVersionTest --tests 'org.apache.gravitino.catalog.doris.integration.test.CatalogDorisIT.testAddColumn*'` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
