geyanggang opened a new pull request, #14665: URL: https://github.com/apache/gravitino/pull/14665
### What changes were proposed in this pull request? `PostgreSqlTableOperations` now preserves an explicit column collation on a column type change. When the target type is a collatable text type and the column has an explicit, non-default collation, the generated `ALTER COLUMN ... SET DATA TYPE` appends `COLLATE "<collation>"`. Non-text target types never receive a `COLLATE` clause, and columns on the database default collation are unaffected. ### Why are the changes needed? `SET DATA TYPE` without `COLLATE` resets the column to the type's default collation, so an explicit non-default collation was silently lost on a type change. Fixes #14662 ### Does this PR introduce _any_ user-facing change? Yes. Changing the type of a PostgreSQL column that has an explicit collation now keeps that collation instead of silently resetting it to the default. ### How was this patch tested? - New `TestPostgreSqlTableOperations` cases: an explicit `"C"` collation survives a type change; a default-collation column stays on the default. - Full `:catalogs:catalog-jdbc-postgresql:build -PskipITs -PskipDockerTests=false` passes (unit, Docker and the pure SQL-generation tests). -- 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]
