sachinnn99 opened a new pull request, #11208: URL: https://github.com/apache/gravitino/pull/11208
> **Depends on:** #11207 (view list/load support). Please review and merge #11207 first. ### What changes were proposed in this pull request? Add write view operations (`createView`, `alterView`, `dropView`) for JDBC catalogs covering MySQL and PostgreSQL. This is the second of two PRs split from #11123, stacked on #11207 (read operations). Key changes: - Add `create`, `replaceDefinition`, `rename`, `drop` methods to `JdbcViewOperations` - Add `createView`, `alterView`, `dropView` to `JdbcViewCatalogOperations` - Add write SQL generation to `MysqlViewOperations` and `PostgreSqlViewOperations` - Wire write methods into `MysqlCatalogOperations` and `PostgreSQLCatalogOperations` - Add `setComment` support for PostgreSQL views via `COMMENT ON VIEW` Includes Copilot review fixes: - `replaceDefinition` checks view existence before executing `CREATE OR REPLACE VIEW` - `extractSqlRepresentation` prefers matching dialect when multiple representations are provided - `schemaExists` catches `NoSuchSchemaException` instead of broad `Exception` ### Why are the changes needed? Completes the JDBC view CRUD support started in #11207. Users can now create, rename, replace, and drop views through the Gravitino API for MySQL and PostgreSQL catalogs. Fix: #11001 ### Does this PR introduce _any_ user-facing change? Yes. `catalog.asViewCatalog().createView()`, `alterView()`, and `dropView()` now work for MySQL and PostgreSQL JDBC catalogs. ### How was this patch tested? - Unit tests: Extended `TestJdbcViewCatalogOperations`, `TestMysqlViewOperations`, `TestPostgreSqlViewOperations` with write operation tests - Integration tests: `CatalogMysqlViewWriteIT`, `CatalogPostgreSqlViewWriteIT` (test create/alter/drop through Gravitino API against Docker containers) -- 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]
