[FLINK-39590] connection catalog manager changes#28085
Open
lihaosky wants to merge 5 commits intoapache:masterfrom
Open
[FLINK-39590] connection catalog manager changes#28085lihaosky wants to merge 5 commits intoapache:masterfrom
lihaosky wants to merge 5 commits intoapache:masterfrom
Conversation
Collaborator
d33c6ab to
31b020a
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 is the purpose of the change
This pull request adds first-class support for catalog connections in the Table API. A
Connectionis a new top-level catalog object (alongside tables, views, functions, and models) that captures the configuration for accessing an external system, so that downstream features can reuse a centrally managed connection definition rather than embedding connection properties in every table DDL.This change introduces the connection lifecycle on the catalog stack — interface methods, in-memory implementation, plumbing through
CatalogManagerandTableEnvironmentImpl, listener events, exception types, and a connection factory — without altering existing catalog object behavior.Brief change log
listConnections,getConnection,connectionExists,createConnection,dropConnection,alterConnection) toCatalogasdefaultmethods, preserving binary/source compatibility for existing implementations.GenericInMemoryCatalog.CatalogManagerwith overloads forObjectIdentifier-based lookup, listing, and create/alter/drop.CatalogManagerto expose aConnectionFactoryand routed connection access fromTableEnvironmentImpl.CreateConnectionEvent,AlterConnectionEvent,DropConnectionEvent, all extending a newConnectionModificationEvent.ConnectionNotExistException,ConnectionAlreadyExistException.ConnectionFactorySPI andDefaultConnectionFactoryimplementation.Verifying this change
Please make sure both new and modified tests in this PR follow the conventions for tests defined in our code quality guide.
This change added tests and can be verified as follows:
CatalogTest(abstract test base, ~220 lines) coveringlistConnections,getConnection,connectionExists,createConnection(incl.ifNotExistssemantics andConnectionAlreadyExistException),dropConnection(incl.ifNotExistssemantics andConnectionNotExistException), andalterConnection.GenericInMemoryCatalogTestextendsCatalogTestand exercises the new methods against the in-memory implementation (123 tests passing locally).Does this pull request potentially affect one of the following parts:
@Public(Evolving): yes —Catalogis@PublicEvolving. New methods aredefault, so existing implementations remain source- and binary-compatible.Documentation
Catalogmethods, listener events, exception types, and theConnectionFactorySPI.Was generative AI tooling used to co-author this PR?
Claude