Skip to content

[#9710] feat(flink-connector): add Flink 1.19 and 1.20 support - #11071

Merged
yuqi1129 merged 8 commits into
apache:mainfrom
FANNG1:flink-1-19-1-20-support
May 22, 2026
Merged

[#9710] feat(flink-connector): add Flink 1.19 and 1.20 support#11071
yuqi1129 merged 8 commits into
apache:mainfrom
FANNG1:flink-1-19-1-20-support

Conversation

@FANNG1

@FANNG1 FANNG1 commented May 13, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR adds Gravitino Flink connector support for Flink 1.19 and Flink 1.20
on top of the versioned-layout baseline established for Flink 1.18 (#10517).

Main changes:

  • Add flink-connector/v1.19/flink + flink-connector/v1.19/flink-runtime
    modules.
  • Add flink-connector/v1.20/flink + flink-connector/v1.20/flink-runtime
    modules.
  • Add version-specific catalog/factory entry classes (*Flink119 /
    *Flink120) for Hive, Iceberg, JDBC-MySQL, JDBC-Postgres, and Paimon.
  • Reuse DefaultCatalogCompat for Flink 1.19 and add CatalogCompatFlink120
    that uses CatalogTable.newBuilder(...) because CatalogTable.of(...) is
    deprecated in Flink 1.20.
  • The JDBC catalog for 1.19 / 1.20 uses the relocated
    org.apache.flink.connector.jdbc.core.* factory packages shipped in
    flink-connector-jdbc 3.3.0-1.19 / 3.3.0-1.20.
  • Add provider-specific integration-test entry classes for each new minor
    version.
  • Add Flink 1.20-specific overrides for missing required catalog options where
    Flink 1.20 reports IllegalArgumentException rather than the
    ValidationException thrown by older minor versions.
  • Extend the Flink CI job to run embedded and deploy mode integration
    tests across 1.18, 1.19, and 1.20.
  • Exclude the new Flink modules from unrelated Backend IT and Trino CI jobs.

No flink-common production changes are required; the 1.18 baseline already
exposes the necessary extension hooks (BaseCatalog#catalogCompat(), the
protected GravitinoJdbcCatalog(Context, ..., AbstractCatalog) constructor,
etc.). The shared Iceberg REST SQL integration test now lives in the common
abstract IT base so the 1.18 / 1.19 / 1.20 entry classes can remain thin stubs.

This PR supersedes #11061 (closed) and the now-stale #10501.

Why are the changes needed?

The Flink 1.18 baseline (#10517) was intentionally limited to one minor and
deferred 1.19 / 1.20 to follow-up work under parent issue #9710. This PR
is that follow-up, so users can target the two currently-maintained Flink
minor versions.

Fix: #9710

Does this PR introduce any user-facing change?

Yes. Two new connector artifacts are produced:

  • gravitino-flink-connector-runtime-1.19_2.12
  • gravitino-flink-connector-runtime-1.20_2.12

The user-facing SQL syntax is unchanged.

How was this patch tested?

Local validations (all green):

  • ./gradlew spotlessApply
  • ./gradlew :flink-connector:flink-1.19:test -PskipITs
  • ./gradlew :flink-connector:flink-1.20:test -PskipITs
  • ./gradlew :flink-connector:flink-runtime-1.19:test
  • ./gradlew :flink-connector:flink-runtime-1.20:test
  • ./gradlew :flink-connector:flink-runtime-1.19:shadowJar :flink-connector:flink-runtime-1.20:shadowJar
  • ./gradlew :spotlessKotlinGradleCheck :flink-connector:flink-1.20:test -PskipITs
  • ./gradlew :flink-connector:flink-common:compileTestJava :flink-connector:flink-1.19:compileJava :flink-connector:flink-1.19:compileTestJava :flink-connector:flink-1.20:compileTestJava :flink-connector:flink-common:spotlessJavaCheck :flink-connector:flink-1.19:spotlessJavaCheck :flink-connector:flink-1.20:spotlessJavaCheck -PskipITs

The runtime-jar tests verify that the version-specific SPI descriptors
(META-INF/services/org.apache.flink.table.factories.Factory) are merged
into the shaded uber-jar.

The full Hive / Iceberg / JDBC / Paimon integration tests for both new
minor versions will run in CI via the updated
.github/workflows/flink-integration-test-action.yml.

@geyanggang
geyanggang self-requested a review May 13, 2026 08:14
Comment thread settings.gradle.kts
@FANNG1
FANNG1 marked this pull request as draft May 15, 2026 03:36
@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown

Code Coverage Report

Overall Project 66.04% -0.05% 🟢
Files changed 0.0% 🔴

Module Coverage
aliyun 1.72% 🔴
api 46.83% 🟢
authorization-common 85.96% 🟢
aws 1.08% 🔴
azure 2.47% 🔴
catalog-common 10.2% 🔴
catalog-fileset 80.02% 🟢
catalog-glue 64.03% 🟢
catalog-hive 79.59% 🟢
catalog-jdbc-clickhouse 80.02% 🟢
catalog-jdbc-common 44.46% 🟢
catalog-jdbc-doris 80.28% 🟢
catalog-jdbc-hologres 54.03% 🟢
catalog-jdbc-mysql 79.23% 🟢
catalog-jdbc-oceanbase 78.38% 🟢
catalog-jdbc-postgresql 82.17% 🟢
catalog-jdbc-starrocks 78.27% 🟢
catalog-kafka 77.01% 🟢
catalog-lakehouse-generic 44.89% 🟢
catalog-lakehouse-hudi 79.1% 🟢
catalog-lakehouse-iceberg 85.88% 🟢
catalog-lakehouse-paimon 77.25% 🟢
catalog-model 77.72% 🟢
cli 44.51% 🟢
client-java 77.92% 🟢
common 49.99% 🟢
core 82.21% 🟢
filesystem-hadoop3 76.97% 🟢
flink 0.0% 🔴
flink-common 43.17% 🟢
flink-runtime 0.0% 🔴
gcp 14.12% 🔴
hadoop-common 10.39% 🔴
hive-metastore-common 53.26% 🟢
iceberg-common 55.24% 🟢
iceberg-rest-server 69.69% 🟢
idp-basic 94.17% 🟢
integration-test-common 0.0% 🔴
jobs 66.17% 🟢
lance-common 20.9% 🔴
lance-rest-server 62.78% 🟢
lineage 53.02% 🟢
optimizer 82.95% 🟢
optimizer-api 21.95% 🔴
server 85.75% 🟢
server-common 71.21% 🟢
spark 32.79% 🔴
spark-common 39.09% 🔴
trino-connector 34.82% 🔴
Files
Module File Coverage
flink GravitinoHiveCatalogFactoryFlink119.java 0.0% 🔴
GravitinoHiveCatalogFlink119.java 0.0% 🔴
GravitinoIcebergCatalogFactoryFlink119.java 0.0% 🔴
GravitinoIcebergCatalogFlink119.java 0.0% 🔴
GravitinoJdbcCatalogFlink119.java 0.0% 🔴
GravitinoMysqlJdbcCatalogFactoryFlink119.java 0.0% 🔴
GravitinoPostgresJdbcCatalogFactoryFlink119.java 0.0% 🔴
GravitinoPaimonCatalogFactoryFlink119.java 0.0% 🔴
GravitinoPaimonCatalogFlink119.java 0.0% 🔴
GravitinoHiveCatalogFactoryFlink120.java 0.0% 🔴
GravitinoHiveCatalogFlink120.java 0.0% 🔴
GravitinoIcebergCatalogFactoryFlink120.java 0.0% 🔴
GravitinoIcebergCatalogFlink120.java 0.0% 🔴
GravitinoJdbcCatalogFlink120.java 0.0% 🔴
GravitinoMysqlJdbcCatalogFactoryFlink120.java 0.0% 🔴
GravitinoPostgresJdbcCatalogFactoryFlink120.java 0.0% 🔴
GravitinoPaimonCatalogFactoryFlink120.java 0.0% 🔴
GravitinoPaimonCatalogFlink120.java 0.0% 🔴
CatalogCompatFlink120.java 0.0% 🔴

@jerryshao

Copy link
Copy Markdown
Contributor

Hi @FANNG1 when will this be ready for review. We want to get this merged in 1.3.0 release.

@FANNG1

FANNG1 commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

Hi @FANNG1 when will this be ready for review. We want to get this merged in 1.3.0 release.

I will polish it today and make it ready to review as soon as possible

Copilot AI 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.

Pull request overview

This pull request extends the versioned Flink connector layout (introduced with the 1.18 baseline) to add build + runtime artifacts and integration-test coverage for Flink 1.19 and 1.20, including a Flink 1.20-specific compatibility hook for CatalogTable construction.

Changes:

  • Adds new Gradle modules for flink-1.19 / flink-runtime-1.19 and flink-1.20 / flink-runtime-1.20, plus version-specific catalog/factory entry points and SPI descriptors.
  • Introduces Flink 1.20 CatalogCompat implementation using CatalogTable.newBuilder() and adjusts version-specific IT expectations where Flink 1.20 changes exception types.
  • Expands CI workflows to execute Flink integration tests across 1.18/1.19/1.20 and excludes the new modules from unrelated Trino workflows.

Reviewed changes

Copilot reviewed 53 out of 53 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
settings.gradle.kts Includes new Flink 1.19/1.20 connector and runtime modules in the multi-version build.
gradle/libs.versions.toml Adds Flink 1.19/1.20 and corresponding JDBC connector version coordinates.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonLocalFileSystemBackendIT120.java Adds Flink 1.20 Paimon filesystem IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonJdbcBackendIT120.java Adds Flink 1.20 Paimon JDBC IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonHiveBackendIT120.java Adds Flink 1.20 Paimon Hive IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/jdbc/FlinkJdbcMysqlCatalogIT120.java Overrides JDBC missing-options assertion for Flink 1.20 exception behavior.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergRestCatalogIT120.java Adds Flink 1.20 Iceberg REST IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergHiveCatalogIT120.java Adds Flink 1.20 Iceberg Hive IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/hive/FlinkHiveKerberosClientIT120.java Adds Flink 1.20 Hive Kerberos IT entry class.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/hive/FlinkHiveCatalogIT120.java Overrides Hive missing-options assertion for Flink 1.20 exception behavior.
flink-connector/v1.20/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/catalog/GravitinoCatalogManagerIT120.java Adds Flink 1.20 catalog manager IT entry class.
flink-connector/v1.20/flink/src/main/resources/META-INF/services/org.apache.flink.table.factories.Factory Declares Flink 1.20 version-specific catalog factories for Flink SPI discovery.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/utils/CatalogCompatFlink120.java Implements Flink 1.20 CatalogCompat using the CatalogTable builder API.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalogFlink120.java Adds Flink 1.20 Paimon catalog entry implementation and selects 1.20 compat hook.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalogFactoryFlink120.java Adds Flink 1.20 Paimon factory entry point.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/postgresql/GravitinoPostgresJdbcCatalogFactoryFlink120.java Adds Flink 1.20 Postgres JDBC factory entry point.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/mysql/GravitinoMysqlJdbcCatalogFactoryFlink120.java Adds Flink 1.20 MySQL JDBC factory entry point.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/GravitinoJdbcCatalogFlink120.java Adds Flink 1.20 JDBC catalog using relocated Flink JDBC factory packages.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/iceberg/GravitinoIcebergCatalogFlink120.java Adds Flink 1.20 Iceberg catalog entry implementation and selects 1.20 compat hook.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/iceberg/GravitinoIcebergCatalogFactoryFlink120.java Adds Flink 1.20 Iceberg factory entry point.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalogFlink120.java Adds Flink 1.20 Hive catalog entry implementation and selects 1.20 compat hook.
flink-connector/v1.20/flink/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalogFactoryFlink120.java Adds Flink 1.20 Hive factory entry point.
flink-connector/v1.20/flink/build.gradle.kts Defines Flink 1.20 module dependencies, publication coordinates, and shared test execution wiring.
flink-connector/v1.20/flink-runtime/src/test/java/org/apache/gravitino/flink/runtime/TestRuntimeJarDependencies.java Adds runtime-jar assertions for Flink 1.20 shaded artifact behavior.
flink-connector/v1.20/flink-runtime/build.gradle.kts Defines Flink 1.20 runtime shaded jar build/publish and dependency constraints.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonLocalFileSystemBackendIT119.java Adds Flink 1.19 Paimon filesystem IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonJdbcBackendIT119.java Adds Flink 1.19 Paimon JDBC IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/paimon/FlinkPaimonHiveBackendIT119.java Adds Flink 1.19 Paimon Hive IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/jdbc/FlinkJdbcMysqlCatalogIT119.java Adds Flink 1.19 JDBC MySQL IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergRestCatalogIT119.java Adds Flink 1.19 Iceberg REST IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergHiveCatalogIT119.java Adds Flink 1.19 Iceberg Hive IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/hive/FlinkHiveKerberosClientIT119.java Adds Flink 1.19 Hive Kerberos IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/hive/FlinkHiveCatalogIT119.java Adds Flink 1.19 Hive IT entry class.
flink-connector/v1.19/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/catalog/GravitinoCatalogManagerIT119.java Adds Flink 1.19 catalog manager IT entry class.
flink-connector/v1.19/flink/src/main/resources/META-INF/services/org.apache.flink.table.factories.Factory Declares Flink 1.19 version-specific catalog factories for Flink SPI discovery.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalogFlink119.java Adds Flink 1.19 Paimon catalog entry implementation.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/paimon/GravitinoPaimonCatalogFactoryFlink119.java Adds Flink 1.19 Paimon factory entry point.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/postgresql/GravitinoPostgresJdbcCatalogFactoryFlink119.java Adds Flink 1.19 Postgres JDBC factory entry point.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/mysql/GravitinoMysqlJdbcCatalogFactoryFlink119.java Adds Flink 1.19 MySQL JDBC factory entry point.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/jdbc/GravitinoJdbcCatalogFlink119.java Adds Flink 1.19 JDBC catalog using relocated Flink JDBC factory packages.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/iceberg/GravitinoIcebergCatalogFlink119.java Adds Flink 1.19 Iceberg catalog entry implementation.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/iceberg/GravitinoIcebergCatalogFactoryFlink119.java Adds Flink 1.19 Iceberg factory entry point.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalogFlink119.java Adds Flink 1.19 Hive catalog entry implementation.
flink-connector/v1.19/flink/src/main/java/org/apache/gravitino/flink/connector/hive/GravitinoHiveCatalogFactoryFlink119.java Adds Flink 1.19 Hive factory entry point.
flink-connector/v1.19/flink/build.gradle.kts Defines Flink 1.19 module dependencies, publication coordinates, and shared test execution wiring.
flink-connector/v1.19/flink-runtime/src/test/java/org/apache/gravitino/flink/runtime/TestRuntimeJarDependencies.java Adds runtime-jar assertions for Flink 1.19 shaded artifact behavior.
flink-connector/v1.19/flink-runtime/build.gradle.kts Defines Flink 1.19 runtime shaded jar build/publish and dependency constraints.
flink-connector/v1.18/flink/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergRestCatalogIT118.java Refactors Flink 1.18 Iceberg REST IT entry class to rely on shared abstract base test logic.
flink-connector/flink-common/src/test/java/org/apache/gravitino/flink/connector/integration/test/iceberg/FlinkIcebergRestCatalogIT.java Moves shared Iceberg REST SQL create-catalog IT into the abstract base class for reuse across versions.
.github/workflows/trino-multi-version-test.yml Excludes new Flink 1.19/1.20 modules from Trino multi-version workflow to keep CI scope focused.
.github/workflows/trino-integration-test.yml Excludes new Flink 1.19/1.20 modules from Trino integration workflow to keep CI scope focused.
.github/workflows/flink-integration-test-action.yml Runs Flink integration tests for 1.18/1.19/1.20 in both embedded and deploy modes and uploads per-version logs.
.github/workflows/backend-integration-test-action.yml Excludes Flink 1.19/1.20 test tasks from backend integration workflows to avoid redundant execution.

@FANNG1

FANNG1 commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@jerryshao @polzyos @lasdf1234 @diqiu50 PTAL, thx

@FANNG1
FANNG1 marked this pull request as ready for review May 20, 2026 02:20
@jerryshao
jerryshao requested a review from Copilot May 20, 2026 07:18
@jerryshao

Copy link
Copy Markdown
Contributor

Do we need to update the root build.gradle.kts to exclude Flink-related modules in package building?

Copilot AI 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.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated no new comments.

@jerryshao

Copy link
Copy Markdown
Contributor

Hi @FANNG1 , this PR is quite straightforward, I have no further comments. I think we still need to update the doc. Will you do it in this PR or the next one?

Copilot AI 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.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated 1 comment.

Comment on lines +29 to +37
public void testCreateGravitinoHiveCatalogRequireOptions() {
// Flink 1.20 reports missing required catalog options through IllegalArgumentException
// rather than the ValidationException thrown by older minor versions.
tableEnv.useCatalog(DEFAULT_CATALOG);

String catalogName = "gravitino_hive_sql2";
Assertions.assertThrows(
IllegalArgumentException.class,
() ->

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.

Fixed in fc89277. The Flink 1.20 override now keeps the IllegalArgumentException assertion and also verifies the exception message chain contains metastore.uris, which is the required Gravitino catalog property surfaced by this code path.

@FANNG1

FANNG1 commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

@jerryshao For package building, I think no root build.gradle.kts change is needed. The root copySubprojectDependencies and copySubprojectLib tasks already exclude projects whose name starts with flink, so the newly added flink-1.19, flink-runtime-1.19, flink-1.20, and flink-runtime-1.20 modules are covered by the existing exclusion.

For docs, I will track the Flink documentation update in #10543 instead of expanding this PR.

Comment thread flink-connector/v1.19/flink/build.gradle.kts
Comment thread flink-connector/v1.20/flink-runtime/build.gradle.kts Outdated
Comment thread flink-connector/v1.20/flink/build.gradle.kts Outdated
@jerryshao

Copy link
Copy Markdown
Contributor

I have no further comments, @yuqi1129 do you want to take another look?

Copilot AI 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.

Pull request overview

Copilot reviewed 53 out of 53 changed files in this pull request and generated 1 comment.

Comment on lines +44 to +49
+ "'default-database'='%s'"
+ ")",
catalogName, mysqlUrl, mysqlUsername, mysqlDefaultDatabase)));

Assertions.assertTrue(exception.getMessage().contains("jdbc-password"));
Assertions.assertFalse(metalake.catalogExists(catalogName));

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.

Fixed in 94d8486. The Flink 1.20 JDBC missing-option assertion now checks for password, which covers the Flink SQL option key while still matching the current Gravitino-side error message.


val flinkVersion: String = libs.versions.flink119.get()
val flinkMajorVersion: String = flinkVersion.substringBeforeLast(".")
val scalaVersion: String = "2.12"

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.

Will we plan to support multiple scale versions?

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.

No, not in this PR. Flink 1.18+ is still wired only for Scala 2.12 here. The 119 / 120 aliases are intended to make the Flink minor version explicit (1.19 / 1.20) and avoid ambiguity with the Scala suffix used in artifact names.

dependsOn(":catalogs:catalog-hive:runtimeJars")
dependsOn(":catalogs:catalog-lakehouse-iceberg:jar")
dependsOn(":catalogs:catalog-lakehouse-iceberg:runtimeJars")
dependsOn(":iceberg:iceberg-rest-server:jar")

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.

Why does it depend on iceberg-rest-server?

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.

This is needed by the Iceberg REST catalog IT path. FlinkEnvIT enables the iceberg-rest auxiliary service for the lakehouse-iceberg provider, and MiniGravitino loads that service from iceberg/iceberg-rest-server/build/libs. The explicit :iceberg:iceberg-rest-server:jar dependency guarantees that jar exists before the Flink IT starts. This is copied from the Flink 1.18 module wiring.

@jerryshao

Copy link
Copy Markdown
Contributor

@yuqi1129 can you take another look?

@yuqi1129
yuqi1129 merged commit 2fc3388 into apache:main May 22, 2026
33 of 36 checks passed
danhuawang pushed a commit to danhuawang/gravitino that referenced this pull request Jun 8, 2026
…pache#11071)

### What changes were proposed in this pull request?

This PR adds Gravitino Flink connector support for Flink 1.19 and Flink
1.20
on top of the versioned-layout baseline established for Flink 1.18
(apache#10517).

Main changes:
- Add `flink-connector/v1.19/flink` +
`flink-connector/v1.19/flink-runtime`
  modules.
- Add `flink-connector/v1.20/flink` +
`flink-connector/v1.20/flink-runtime`
  modules.
- Add version-specific catalog/factory entry classes (`*Flink119` /
  `*Flink120`) for Hive, Iceberg, JDBC-MySQL, JDBC-Postgres, and Paimon.
- Reuse `DefaultCatalogCompat` for Flink 1.19 and add
`CatalogCompatFlink120`
that uses `CatalogTable.newBuilder(...)` because `CatalogTable.of(...)`
is
  deprecated in Flink 1.20.
- The JDBC catalog for 1.19 / 1.20 uses the relocated
  `org.apache.flink.connector.jdbc.core.*` factory packages shipped in
  `flink-connector-jdbc 3.3.0-1.19` / `3.3.0-1.20`.
- Add provider-specific integration-test entry classes for each new
minor
  version.
- Add Flink 1.20-specific overrides for missing required catalog options
where
  Flink 1.20 reports `IllegalArgumentException` rather than the
  `ValidationException` thrown by older minor versions.
- Extend the Flink CI job to run embedded and deploy mode integration
  tests across 1.18, 1.19, and 1.20.
- Exclude the new Flink modules from unrelated Backend IT and Trino CI
jobs.

No `flink-common` production changes are required; the 1.18 baseline
already
exposes the necessary extension hooks (`BaseCatalog#catalogCompat()`,
the
protected `GravitinoJdbcCatalog(Context, ..., AbstractCatalog)`
constructor,
etc.). The shared Iceberg REST SQL integration test now lives in the
common
abstract IT base so the 1.18 / 1.19 / 1.20 entry classes can remain thin
stubs.

This PR supersedes apache#11061 (closed) and the now-stale apache#10501.

### Why are the changes needed?

The Flink 1.18 baseline (apache#10517) was intentionally limited to one minor
and
deferred 1.19 / 1.20 to follow-up work under parent issue apache#9710. This PR
is that follow-up, so users can target the two currently-maintained
Flink
minor versions.

Fix: apache#9710

### Does this PR introduce _any_ user-facing change?

Yes. Two new connector artifacts are produced:

- `gravitino-flink-connector-runtime-1.19_2.12`
- `gravitino-flink-connector-runtime-1.20_2.12`

The user-facing SQL syntax is unchanged.

### How was this patch tested?

Local validations (all green):

- `./gradlew spotlessApply`
- `./gradlew :flink-connector:flink-1.19:test -PskipITs`
- `./gradlew :flink-connector:flink-1.20:test -PskipITs`
- `./gradlew :flink-connector:flink-runtime-1.19:test`
- `./gradlew :flink-connector:flink-runtime-1.20:test`
- `./gradlew :flink-connector:flink-runtime-1.19:shadowJar
:flink-connector:flink-runtime-1.20:shadowJar`
- `./gradlew :spotlessKotlinGradleCheck :flink-connector:flink-1.20:test
-PskipITs`
- `./gradlew :flink-connector:flink-common:compileTestJava
:flink-connector:flink-1.19:compileJava
:flink-connector:flink-1.19:compileTestJava
:flink-connector:flink-1.20:compileTestJava
:flink-connector:flink-common:spotlessJavaCheck
:flink-connector:flink-1.19:spotlessJavaCheck
:flink-connector:flink-1.20:spotlessJavaCheck -PskipITs`

The runtime-jar tests verify that the version-specific SPI descriptors
(`META-INF/services/org.apache.flink.table.factories.Factory`) are
merged
into the shaded uber-jar.

The full Hive / Iceberg / JDBC / Paimon integration tests for both new
minor versions will run in CI via the updated
`.github/workflows/flink-integration-test-action.yml`.

---------

Co-authored-by: fanng <“fanng@apache.org”>
danhuawang pushed a commit to danhuawang/gravitino that referenced this pull request Jun 9, 2026
…pache#11071)

### What changes were proposed in this pull request?

This PR adds Gravitino Flink connector support for Flink 1.19 and Flink
1.20
on top of the versioned-layout baseline established for Flink 1.18
(apache#10517).

Main changes:
- Add `flink-connector/v1.19/flink` +
`flink-connector/v1.19/flink-runtime`
  modules.
- Add `flink-connector/v1.20/flink` +
`flink-connector/v1.20/flink-runtime`
  modules.
- Add version-specific catalog/factory entry classes (`*Flink119` /
  `*Flink120`) for Hive, Iceberg, JDBC-MySQL, JDBC-Postgres, and Paimon.
- Reuse `DefaultCatalogCompat` for Flink 1.19 and add
`CatalogCompatFlink120`
that uses `CatalogTable.newBuilder(...)` because `CatalogTable.of(...)`
is
  deprecated in Flink 1.20.
- The JDBC catalog for 1.19 / 1.20 uses the relocated
  `org.apache.flink.connector.jdbc.core.*` factory packages shipped in
  `flink-connector-jdbc 3.3.0-1.19` / `3.3.0-1.20`.
- Add provider-specific integration-test entry classes for each new
minor
  version.
- Add Flink 1.20-specific overrides for missing required catalog options
where
  Flink 1.20 reports `IllegalArgumentException` rather than the
  `ValidationException` thrown by older minor versions.
- Extend the Flink CI job to run embedded and deploy mode integration
  tests across 1.18, 1.19, and 1.20.
- Exclude the new Flink modules from unrelated Backend IT and Trino CI
jobs.

No `flink-common` production changes are required; the 1.18 baseline
already
exposes the necessary extension hooks (`BaseCatalog#catalogCompat()`,
the
protected `GravitinoJdbcCatalog(Context, ..., AbstractCatalog)`
constructor,
etc.). The shared Iceberg REST SQL integration test now lives in the
common
abstract IT base so the 1.18 / 1.19 / 1.20 entry classes can remain thin
stubs.

This PR supersedes apache#11061 (closed) and the now-stale apache#10501.

### Why are the changes needed?

The Flink 1.18 baseline (apache#10517) was intentionally limited to one minor
and
deferred 1.19 / 1.20 to follow-up work under parent issue apache#9710. This PR
is that follow-up, so users can target the two currently-maintained
Flink
minor versions.

Fix: apache#9710

### Does this PR introduce _any_ user-facing change?

Yes. Two new connector artifacts are produced:

- `gravitino-flink-connector-runtime-1.19_2.12`
- `gravitino-flink-connector-runtime-1.20_2.12`

The user-facing SQL syntax is unchanged.

### How was this patch tested?

Local validations (all green):

- `./gradlew spotlessApply`
- `./gradlew :flink-connector:flink-1.19:test -PskipITs`
- `./gradlew :flink-connector:flink-1.20:test -PskipITs`
- `./gradlew :flink-connector:flink-runtime-1.19:test`
- `./gradlew :flink-connector:flink-runtime-1.20:test`
- `./gradlew :flink-connector:flink-runtime-1.19:shadowJar
:flink-connector:flink-runtime-1.20:shadowJar`
- `./gradlew :spotlessKotlinGradleCheck :flink-connector:flink-1.20:test
-PskipITs`
- `./gradlew :flink-connector:flink-common:compileTestJava
:flink-connector:flink-1.19:compileJava
:flink-connector:flink-1.19:compileTestJava
:flink-connector:flink-1.20:compileTestJava
:flink-connector:flink-common:spotlessJavaCheck
:flink-connector:flink-1.19:spotlessJavaCheck
:flink-connector:flink-1.20:spotlessJavaCheck -PskipITs`

The runtime-jar tests verify that the version-specific SPI descriptors
(`META-INF/services/org.apache.flink.table.factories.Factory`) are
merged
into the shaded uber-jar.

The full Hive / Iceberg / JDBC / Paimon integration tests for both new
minor versions will run in CI via the updated
`.github/workflows/flink-integration-test-action.yml`.

---------

Co-authored-by: fanng <“fanng@apache.org”>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] support multi version for Gravitino Flink connector

5 participants