You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "lvyanquan (via GitHub)" <gi...@apache.org> on 2026/09/28 08:31:29 UTC
[PR] [FLINK-40739][maxcompute] Fix partition handling for sink writes [flink-cdc]
lvyanquan opened a new pull request, #4562:
URL: https://github.com/apache/flink-cdc/pull/4562
This PR cherry-picks the maxcompute partition handling fix and adds the missing mockito test dependencies required by the introduced unit tests.\n\n## Change Log\n- Fix partition handling for sink writes in the maxcompute pipeline connector.\n- Add mockito-inline, mockito-core and mockito-junit-jupiter test dependencies to flink-cdc-pipeline-connector-maxcompute.\n\n## Testing\n- `mvn -pl flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-maxcompute -am -DskipTests -Dspotless.check.skip=true -Dcheckstyle.skip=true -Drat.skip=true clean install` passes.\n- `mvn -pl flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-maxcompute -Dspotless.check.skip=true -Dcheckstyle.skip=true -Drat.skip=true test` passes (18 tests).
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40739][maxcompute] Fix partition handling for sink writes [flink-cdc]
Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan merged PR #4562:
URL: https://github.com/apache/flink-cdc/pull/4562
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-40739][maxcompute] Fix partition handling for sink writes [flink-cdc]
Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan commented on PR #4562:
URL: https://github.com/apache/flink-cdc/pull/4562#issuecomment-5876533632
Fixed the partitioned-table e2e failure.
**Root cause:** `MaxComputeUtils.createPartitionIfAbsent` always calls `Table.createPartition(spec, true)`, which issues `ALTER TABLE <project>.<table> ADD IF NOT EXISTS PARTITION (...)`. The MaxCompute emulator (v0.0.7) only rewrites CREATE TABLE / ADD|DROP|RENAME COLUMN / DROP TABLE statements and passes other statements straight to its sqlite backend, so the ALTER fails with `no such table: MOCKED_MC.TABLE1` and the job gets stuck restarting.
**Fix:** check `hasPartition` first and skip creation when the partition exists. On real MaxCompute this is a pure idempotency improvement (the `ifNotExists` flag still guards concurrent creation between check and create); on the emulator `hasPartition` returns true, so the unsupported ALTER is never issued. Verified locally that the full write path (create partitioned table -> createPartitionIfAbsent -> upsert session with partition spec -> write/flush/commit -> query back 3 rows across 2 partitions) works against the emulator via the new `MaxComputeUtilsPartitionTest`.
Also made `EmulatorTestBase` create a fresh container per test class (a stopped GenericContainer cannot be restarted) and set the tunnel endpoint, which the upsert-session path needs.
--
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org