openinx opened a new pull request, #18498:
URL: https://github.com/apache/iceberg/pull/18498

   Flink SQL filters on TIMESTAMP(9) can discard matching rows because 
timestamp literals are truncated to microseconds. Preserve higher-precision 
literals as timestamp strings so filter binding and source split serialization 
retain all digits.
   
   The SQL example to reproduce this problem: 
   
   ```sql
   SET 'execution.runtime-mode' = 'batch';
   SET 'table.dml-sync' = 'true';
   
   CREATE TABLE trades (
       trade_id INT,
       trade_time TIMESTAMP(9)
   ) WITH (
       'format-version' = '3',
       'write.format.default' = 'parquet'
   );
   
   INSERT INTO trades
   VALUES (
       1,
       CAST('2024-01-01 09:30:00.123456789' AS TIMESTAMP(9))
   );
   
   -- Verify that the trade exists.
   SELECT trade_id, trade_time FROM trades;
   
   -- Look up that exact trade timestamp.
   SELECT trade_id
   FROM trades
   WHERE trade_time =
       CAST('2024-01-01 09:30:00.123456789' AS TIMESTAMP(9));
   
   -- Before the fix:  the query will return no rows. 
   -- After the fix:  the query will return tradeI_id = 1. 
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to