Skip to content

[Migrate] Migrate streampark-flink-shims from Scala to Java - #4461

Merged
wolfboys merged 5 commits into
apache:devfrom
shangeyao:migrate/4447-flink-shims-scala-to-java
Jul 28, 2026
Merged

[Migrate] Migrate streampark-flink-shims from Scala to Java#4461
wolfboys merged 5 commits into
apache:devfrom
shangeyao:migrate/4447-flink-shims-scala-to-java

Conversation

@shangeyao

Copy link
Copy Markdown
Contributor

Summary

  • Complete [Flink] Migrate streampark-flink-shims from Scala to Java #4447: migrate all streampark-flink-shims sources (base + Flink 1.12–1.20 + shims-test) from Scala to Java with no remaining .scala under src/main or src/test.
  • Builds on [Common] Migrate streampark-common from Scala to Java #4445 (streampark-common Java migration) and related JDK 11 / CI fixes already on this branch.
  • Preserve existing behavior: SQL parse/execute/validate, environment initializers, version-specific TableContext / StreamTableContext, cluster/k8s client wrappers, and Scala-bridge Flink APIs used by sqlclient / console submit paths.

Migration phases (this PR)

Phase Scope
Phase 1 shims-base leaf APIs (FlinkConfiguration, traits, utils, config types)
Phase 2 SQL runtime (SqlCommandParser, FlinkSqlExecutor, FlinkSqlValidator, initializers)
Phase 3 FlinkTableTrait / FlinkStreamTableTrait, per-version contexts/clients/TableExt, JUnit 5 shims-test

Acceptance (#4447)

  • No .scala under streampark-flink-shims (src/main + src/test)
  • All shims modules compile (1.12–1.20)
  • streampark-flink-shims-test passes (11 tests)

Test plan

  • mvn -f streampark-flink/streampark-flink-shims/pom.xml clean compile
  • mvn -f streampark-flink/streampark-flink-shims/pom.xml test -DskipITs
  • CI Backend / Unit-Test / Sonar (on merge)
  • Smoke: Console Flink SQL submit path (manual, post-merge)

Closes #4447

Made with Cursor

@shangeyao shangeyao changed the title [Migrate] #4447 Migrate streampark-flink-shims from Scala to Java [Migrate] Migrate streampark-flink-shims from Scala to Java Jul 27, 2026
shangeyao and others added 4 commits July 27, 2026 16:04
…Java

streampark-flink-core was removed in apache#4432; migrate equivalent core infrastructure
in streampark-flink-shims-base. Convert config, CLI, client traits, and env utils
to Java while keeping Scala initializers/traits compiling against Java APIs.

Closes apache#4446 (partial — 8/15 Scala files migrated)

Co-authored-by: Cursor <cursoragent@cursor.com>
…tializers to Java

Move SqlCommandParser, FlinkSqlExecutor, FlinkSqlValidator, and environment
initializers from Scala to Java while keeping Scala trait bridges unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
…to-Java migration

Convert FlinkStreamTableTrait, version-specific contexts/clients, and shims-test
to Java; remove all remaining Scala sources under streampark-flink-shims.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add SonarCloud CPD exclusions for versioned shims modules, fix unused
exception in FlinkTableInitializer, and simplify SqlCommandConverters quote
stripping to satisfy reliability rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shangeyao
shangeyao force-pushed the migrate/4447-flink-shims-scala-to-java branch from 2021c1b to 6f21efe Compare July 27, 2026 08:05
SqlCommandCall.operands is now a nullary Java accessor; use operands()(n)
instead of operands(n) to avoid passing the index to the method itself.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sonarqubecloud

Copy link
Copy Markdown

@wolfboys wolfboys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@wolfboys
wolfboys merged commit 63b4a47 into apache:dev Jul 28, 2026
38 checks passed
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.

[Flink] Migrate streampark-flink-shims from Scala to Java

2 participants