Skip to content

[FLINK-38262][table] alter connection rename operation#28793

Open
Shekharrajak wants to merge 4 commits into
apache:masterfrom
Shekharrajak:FLINK-38262-alter-connection-rename-operation
Open

[FLINK-38262][table] alter connection rename operation#28793
Shekharrajak wants to merge 4 commits into
apache:masterfrom
Shekharrajak:FLINK-38262-alter-connection-rename-operation

Conversation

@Shekharrajak

@Shekharrajak Shekharrajak commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Adds ALTER CONNECTION ... RENAME TO conversion/execution, catalog rename support, temporary connection rename handling, and catalog/runtime tests.

Brief change log

Add ALTER CONNECTION RENAME operation

Verifying this change

Unit tests and IT

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no) no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no) yes
  • The serializers: (yes / no / don't know) no
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know) no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) no
  • The S3 file system connector: (yes / no / don't know) no

Documentation

  • Does this pull request introduce a new feature? (yes / no) yes
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

Was generative AI tooling used to co-author this PR?
  • Yes

@flinkbot

flinkbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@Shekharrajak
Shekharrajak force-pushed the FLINK-38262-alter-connection-rename-operation branch from 9b6de7f to 159e39c Compare July 21, 2026 17:27

@snuyanzin snuyanzin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not ignore Contributors form

@Shekharrajak
Shekharrajak force-pushed the FLINK-38262-alter-connection-rename-operation branch from 159e39c to 1fdc876 Compare July 22, 2026 04:54
@Shekharrajak

Copy link
Copy Markdown
Contributor Author

@flinkbot run azure

@raminqaf raminqaf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Left some comments

Comment on lines +1044 to +1063
/**
* Rename an existing connection.
*
* @param connectionPath Path of the connection to be renamed
* @param newConnectionName the new name of the connection
* @param ignoreIfNotExists Flag to specify behavior when the connection does not exist: if set
* to false, throw an exception, if set to true, do nothing.
* @throws ConnectionNotExistException if the connection does not exist
* @throws ConnectionAlreadyExistException if a connection with the new name already exists
* @throws CatalogException in case of any runtime exception
*/
default void renameConnection(
ObjectPath connectionPath, String newConnectionName, boolean ignoreIfNotExists)
throws ConnectionNotExistException, ConnectionAlreadyExistException, CatalogException {
throw new UnsupportedOperationException(
String.format(
"renameConnection(ObjectPath, String, boolean) is not implemented for %s.",
this.getClass()));
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the community aligned with adding this to the public API? I haven't seen a Mailing Thread or FLIP on this. Maybe I have missed it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moreover, in the PR description you mentioned:

The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no) no

Which is not the case here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shekharrajak and others added 3 commits July 27, 2026 19:26
…k/table/catalog/CatalogManager.java

Co-authored-by: Ramin Gharib <ramingharib@gmail.com>
…k/table/catalog/CatalogManager.java

Co-authored-by: Ramin Gharib <ramingharib@gmail.com>
Comment on lines +98 to +99
tEnv().executeSql("CREATE TEMPORARY CONNECTION my_conn WITH ('k' = 'v')");
tEnv().executeSql("CREATE TEMPORARY CONNECTION new_conn WITH ('k' = 'v')");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will happen if there is a temporary connection and we create a non temporary connection?
and vice versa?

@github-actions github-actions Bot added the community-reviewed PR has been reviewed by the community. label Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-reviewed PR has been reviewed by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants