Skip to content

[FLINK-39656][hive] Remove deprecated HiveCatalog.getTableFactory() override#42

Open
jlalwani-amazon wants to merge 1 commit into
apache:mainfrom
jlalwani-amazon:flink-39656-remove-gettablefactory
Open

[FLINK-39656][hive] Remove deprecated HiveCatalog.getTableFactory() override#42
jlalwani-amazon wants to merge 1 commit into
apache:mainfrom
jlalwani-amazon:flink-39656-remove-gettablefactory

Conversation

@jlalwani-amazon
Copy link
Copy Markdown

@jlalwani-amazon jlalwani-amazon commented May 12, 2026

What is the purpose of the change

Remove the legacy TableFactory code path that has been fully replaced by HiveDynamicTableFactory (the DynamicTableSourceFactory/DynamicTableSinkFactory implementation discovered via SPI through getFactory()).

The legacy TableFactory interface was moved to org.apache.flink.table.legacy.factories in Flink 2.0, indicating it is deprecated. The HiveTableFactory class and HiveCatalog.getTableFactory() override are dead code — never invoked at runtime since Flink 1.14+ uses the new factory path.

JIRA: FLINK-39656

Brief change log

  • Remove getTableFactory() override from HiveCatalog
  • Delete HiveTableFactory.java (dead code, never invoked at runtime)
  • Remove testGenericTable from HiveTableFactoryTest (tested the legacy path)
  • Fix stray logger reference in HiveFunctionDefinitionFactory
  • Remove unused legacy imports
  • Update HiveTableFactoryTest Javadoc to reference HiveDynamicTableFactory

Verifying this change

CI passed on fork: https://github.com/jlalwani-amazon/flink-connector-hive/actions

mvn compile test-compile -pl flink-connector-hive -am

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

  • Dependencies: no
  • The public API: no (removes deprecated/legacy code path)
  • The serializers: no
  • The runtime per-record code paths: no
  • Anything that affects deployment or recovery: no

…nd HiveTableFactory

The legacy TableFactory interface (now in org.apache.flink.table.legacy)
is fully replaced by HiveDynamicTableFactory discovered via SPI through
getFactory(). Remove all dead legacy code:

- Remove getTableFactory() override from HiveCatalog
- Delete HiveTableFactory.java (dead code, never invoked at runtime)
- Remove testGenericTable (tested the legacy path)
- Fix stray logger reference in HiveFunctionDefinitionFactory
- Remove unused legacy imports
@jlalwani-amazon jlalwani-amazon force-pushed the flink-39656-remove-gettablefactory branch from b777471 to 1a33783 Compare May 12, 2026 16:16
@jlalwani-amazon jlalwani-amazon marked this pull request as draft May 12, 2026 16:18
@jlalwani-amazon jlalwani-amazon marked this pull request as ready for review May 13, 2026 16:09
Copy link
Copy Markdown

@davidradl davidradl left a comment

Choose a reason for hiding this comment

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

we should not remove content until we haver a version change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants