taoran92 opened a new issue, #11301:
URL: https://github.com/apache/paimon/issues/11301

   ### Search before asking
   
   - [x] I searched the issues. 
[#3346](https://github.com/apache/paimon/issues/3346) concerns an unset 
watermark (`Long.MIN_VALUE`); this report concerns a supplied microsecond 
`end-input.watermark`.
   
   ### Paimon version
   
   `master` at `df565c64f7`
   
   ### Compute Engine
   
   Flink SQL 1.20.3, batch mode
   
   ### Minimal reproduce step
   
   Start a Flink SQL session with the Paimon connector for Flink 1.20.
   
   ```sql
   SET 'execution.runtime-mode' = 'batch';
   
   CREATE CATALOG IF NOT EXISTS paimon_test WITH (
     'type' = 'paimon',
     'warehouse' = 'file:///tmp/paimon-test-warehouse'
   );
   USE CATALOG paimon_test;
   
   CREATE DATABASE IF NOT EXISTS test_db;
   USE test_db;
   
   CREATE TABLE t (k INT, v INT) WITH (
     'bucket' = '1',
     'bucket-key' = 'k',
     'tag.automatic-creation' = 'watermark',
     'tag.creation-period' = 'hourly'
   );
   
   -- The first job supplies epoch microseconds by mistake.
   INSERT INTO t /*+ OPTIONS('end-input.watermark' = '1726000000000000') */ 
VALUES (1, 11);
   
   -- The next job supplies epoch milliseconds for an event one hour later.
   INSERT INTO t /*+ OPTIONS('end-input.watermark' = '1726003600000') */ VALUES 
(2, 22);
   ```
   
   After each `INSERT` finishes, run these queries to inspect the committed 
watermark and any hourly tags.
   
   ```sql
   SELECT snapshot_id, `watermark`, total_record_count
   FROM paimon_test.test_db.`t$snapshots`
   ORDER BY snapshot_id;
   
   SELECT tag_name, snapshot_id
   FROM paimon_test.test_db.`t$tags`
   ORDER BY snapshot_id, tag_name;
   ```
   
   ### What doesn't meet your expectations?
   
   **Expected**
   
   When the supplied watermark cannot produce an hourly tag, the first `INSERT` 
should report the invalid value before publishing the snapshot. A later write 
with a valid millisecond watermark should be able to create its tag.
   
   **Actual**
   
   The first `INSERT` succeeds and publishes snapshot 1 with watermark 
`1726000000000000`. Its hourly tag is missing. The second `INSERT` also 
succeeds and publishes snapshot 2 with the same watermark, even though it 
supplied `1726003600000`. The table still has no tags. Both jobs log the 
following error during tag creation.
   
   ```text
   java.time.DateTimeException: Field Year cannot be printed as the value 56664 
exceeds the maximum print width of 4
   ```
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!
   


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