apache / paimon

Apache Paimon is a lake format that enables building a Realtime Lakehouse Architecture with Flink and Spark for both streaming and batch operations.
https://paimon.apache.org/
Apache License 2.0
2.43k stars 954 forks source link

[flink] change env.fromData to fromElements for compatibility with flink 1.18 and lower versions #4541

Closed LsomeYeah closed 2 days ago

LsomeYeah commented 3 days ago

Purpose

Linked issue: close #xxx

In FlinkOrphanFilesClean#doOrphanClean, env.fromData is used for collecting information. While env.fromData was introduced in Flink 1.19, so it'll throw NoSuchMethodError when used in Flink 1.18- version. This pr changed env.fromData to env.fromElements to be compatible with lower flink versions.

Tests

API and Format

Documentation

JingsongLi commented 3 days ago

Please add tests.