HennesyChihiro commented on issue #14214:
URL: https://github.com/apache/iceberg/issues/14214#issuecomment-3768448988

   Subject: Identified the root cause and prepared a fix
   
   Hi, I've investigated this issue and confirmed that the date mismatch for 
dates before 1582-10-15 is caused by the missing rebase logic in both the ORC 
writer and metrics collection.
   
   Specifically:
   
   Writer: GenericOrcWriters.java needs to adjust the epoch days for historical 
dates.
   
   Metrics: OrcMetrics.java also requires the same adjustment to ensure that 
lower/upper bounds match the stored data, allowing predicate pushdown (WHERE 
clauses) to work correctly.
   
   I have already verified the fix in a Spark 3.5 environment with the date 
0601-03-03 and confirmed that the data is correctly persisted and searchable 
via CAST(dt AS STRING).
   
   I'm planning to submit a Pull Request shortly. May I take this issue?


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