[#11001] feat(catalog-jdbc): Add view create/alter/drop support for MySQL and PostgreSQL catalogs - #11208
Closed
sachinnn99 wants to merge 4 commits into
Closed
[#11001] feat(catalog-jdbc): Add view create/alter/drop support for MySQL and PostgreSQL catalogs#11208sachinnn99 wants to merge 4 commits into
sachinnn99 wants to merge 4 commits into
Conversation
sachinnn99
force-pushed
the
feat/11001-jdbc-view-write
branch
3 times, most recently
from
May 25, 2026 09:39
2412658 to
d310092
Compare
…QL and PostgreSQL catalogs
sachinnn99
force-pushed
the
feat/11001-jdbc-view-write
branch
from
May 27, 2026 09:44
d310092 to
ffc7f0e
Compare
…view load Add loadComment() template method to JdbcViewOperations so the load path populates JdbcView.comment(). PostgreSQL overrides it to query pg_description via obj_description(); MySQL returns null since views have no comment support.
… for MySQL and PostgreSQL catalogs
…ew support - Load view comments from pg_description via obj_description() in PostgreSQL, resolving the comment round-trip gap - Add loadComment() template method to JdbcViewOperations base class - Strengthen IT type assertions to verify actual mapped types - Add reverse-order alter test (replace-then-rename)
sachinnn99
force-pushed
the
feat/11001-jdbc-view-write
branch
from
May 28, 2026 15:03
4786a76 to
1db83ed
Compare
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.
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:
create,replaceDefinition,rename,dropmethods toJdbcViewOperationscreateView,alterView,dropViewtoJdbcViewCatalogOperationsMysqlViewOperationsandPostgreSqlViewOperationsMysqlCatalogOperationsandPostgreSQLCatalogOperationssetCommentsupport for PostgreSQL views viaCOMMENT ON VIEWIncludes review fixes:
replaceDefinitionchecks view existence before executingCREATE OR REPLACE VIEWextractSqlRepresentationprefers matching dialect when multiple representations are providedschemaExistscatchesNoSuchSchemaExceptioninstead of broadExceptionSQLRepresentation[]conversion instead of direct array castWhy 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(), anddropView()now work for MySQL and PostgreSQL JDBC catalogs.How was this patch tested?
TestJdbcViewCatalogOperations,TestMysqlViewOperations,TestPostgreSqlViewOperationswith write operation testsCatalogMysqlViewWriteIT,CatalogPostgreSqlViewWriteIT(test create/alter/drop through Gravitino API against Docker containers)Known Limitations
createView()are silently discarded on MySQL.COMMENT ON VIEWbutloadView()does not read them back frompg_description. Follow-up item.alterTable(which batches non-rename changes into a single SQL and forbids mixing rename with other changes),alterViewapplies each change as a separate SQL statement and allows rename to be combined with other changes. The validation pass rejects unsupported changes before any are applied.