NestDream opened a new pull request, #11375:
URL: https://github.com/apache/paimon/pull/11375

   ### Purpose
   
   Add `paimon-flink-2.3` and build the `flink2` profile against Flink 2.3.0. 
The wiring follows #6775: `tools/ci`, `release-java.yml`, an e2e profile for 
the previous default (`flink-2.2`) and the docs.
   
   `IntervalFreshness.TimeUnit` moved to `Interval.TimeUnit` (FLINK-39348), so 
`FlinkCatalog` does not compile against 2.3.0. 
`CatalogMaterializedTable.Builder` requires an original and an expanded query 
(FLINK-38355). Paimon stores one definition query, the expanded text, and uses 
it for both. The three affected calls go through `MaterializedTableUtils`, with 
the 2.3 calls in `paimon-flink2-common` and the old ones in 
`paimon-flink1-common`. `paimon-flink2-common` is shaded into every 2.x bundle, 
so `paimon-flink-2.0`, 2.1 and 2.2 each carry a copy with the old calls, like 
`ManagedMemoryUtils` in 1.16 to 1.18.
   
   On Flink 2.3.0 `FRESHNESS = INTERVAL '1' WEEK` with `REFRESH_MODE = 
CONTINUOUS` reaches the catalog as WEEK (the 2.2.1 planner turned it into `1 
DAY`). Paimon stores four units, so `FlinkCatalog` now rejects it with 
`Materialized table freshness in WEEK is not supported, use SECOND, MINUTE, 
HOUR or DAY.`
   
   Two other things on 2.3.0 are outside this PR:
   
   - `CREATE OR ALTER MATERIALIZED TABLE` creates the table. The same statement 
run again is refused and leaves the table suspended until `RESUME`, like `ALTER 
MATERIALIZED TABLE ... AS` on 2.2.
   - For `START_MODE = FROM_NOW` the planner hands `FROM_BEGINNING` to the 
catalog (FLINK-39303 is not in 2.3.0). Paimon does not store the start mode.
   
   For a plan made on 2.3 the planner no longer sets name, description and uid 
on the transformation a `DataStreamScanProvider` returns. A provider now takes 
them from `ProviderContext` (FLINK-38738). `PaimonDataStreamScanProvider` sets 
all three. `getName` and `getDescription` are new in 2.3 and looked up 
reflectively. Older planners set both themselves.
   
   The uid is `generateUid("source")`, the planner's value up to 2.2. It is set 
only when the planner generates uids (compiled plans, 
`table.exec.uid.generation = ALWAYS`). Without that uid a savepoint taken on 
Flink 2.2.1 with `ALWAYS` is refused on 2.3.0. As on 2.2 it replaces a uid from 
`source.operator-uid.suffix`, so a 2.2 savepoint taken with `ALWAYS` and the 
suffix still restores.
   
   That leaves out a job that ran on Flink 2.3.0 with a `paimon-flink-2.2` jar 
and `ALWAYS`. In my run its savepoint was refused, and with 
`execution.state-recovery.ignore-unclaimed-state` the source read the table 
from the beginning. For the uids of Paimon's other operators see #10109.
   
   ### Tests
   
   - `MaterializedTableUtilsTest` and `FlinkCatalogMaterializedTableTest` in 
`paimon-flink-2.0`, 2.1 and 2.2, against the module's Flink version. Without 
the module's copy they fail with `NoSuchMethodError`.
   - `MaterializedTableUtilsTest` in `paimon-flink-2.3` and 
`paimon-flink-common`; a `FlinkCatalogTest` case for the rejected units (Flink 
2 profile).
   - `ContinuousFileStoreITCase#testSourceOperatorNameAndDescription` and 
`#testSourceOperatorUid`.
   - `SchemaChangeITCase` now accepts the old and the new wording of four 
`ALTER TABLE` error messages, and `WriterCoordinatorRecoveryITCase` sets the 
minimum checkpoint pause to the interval (FLINK-38939).
   
   CI on my fork is green in every job, both E2E jobs included, after 
re-running the jobs that failed in the JDK setup step: 
https://github.com/NestDream/paimon/actions/runs/45138282718
   
   I also ran these locally, on an earlier revision of this branch (older 
master, same `src/main` changes):
   
   - Batch and streaming jobs, a continuous materialized table and a savepoint 
restore worked on standalone clusters with Flink 2.3.0, 2.2.1, 2.1.3, 2.0.2 and 
1.20.5, each with its own bundle.
   - A streaming `INSERT INTO` between two primary-key tables, started on Flink 
2.2.1 with the released `paimon-flink-2.2-2.1.0.jar`, resumed from its 
savepoint on 2.3.0 with the new bundle and wrote every row exactly once. Same 
with `ALWAYS` and with `ALWAYS` plus `source.operator-uid.suffix`.
   
   Not run: the release workflow, the e2e suites with the new `flink-2.2` 
profile (no CI job selects it) and a savepoint restore of a compiled plan.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to