bgeng777 opened a new pull request, #29509:
URL: https://github.com/apache/flink/pull/29509

   ## What is the purpose of the change
   
   Fixes [FLINK-32040](https://issues.apache.org/jira/browse/FLINK-32040).
   
   Calling `with_idleness()` after `with_timestamp_assigner()` discards the 
Python timestamp assigner. Event-time windows can then fail with `Record has 
Java Long.MIN_VALUE timestamp`. `with_watermark_alignment()` loses the assigner 
for the same reason.
   
   This change preserves the Python timestamp assigner when either method 
creates a new watermark strategy.
   
   ## Brief change log
   
   - Retain the timestamp assigner in `with_idleness()` and both overloads of 
`with_watermark_alignment()`.
   - Add tests for assigner preservation, configuring the assigner after 
enrichment, and independence of the original strategy.
   - Extend the existing event-time tumbling-window test with idleness 
detection. The shared test runs in process and thread modes.
   
   ## Verifying this change
   
   - Before the fix, the new preservation tests failed and the process-mode 
window test reproduced the `Long.MIN_VALUE` error from the issue.
   - After the fix, all 8 watermark-strategy tests and the process/thread 
window tests passed: **10 passed**.
   - Flake8 and `git diff --check` passed.
   - Local verification used the current Python sources with existing Flink 
2.3-SNAPSHOT Java build artifacts, Python 3.11 and JDK 21. Full `./mvnw clean 
verify` has not been run; validation against a fresh master build remains for 
CI.
   
   The alignment tests verify strategy construction and preservation of the 
Python assigner; they do not claim end-to-end source watermark-alignment 
coverage.
   
   ## Does this pull request potentially affect one of the following parts:
   
   - Dependencies (does it add or upgrade a dependency): no
   - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no; no API signatures or stability annotations change
   - The serializers: no
   - The runtime per-record code paths (performance sensitive): no; the change 
is limited to strategy construction
   - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
   - The S3 file system connector: no
   
   ## Documentation
   
   - Does this pull request introduce a new feature? no
   - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Codex (GPT-6)
   


-- 
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