madeirak opened a new issue, #13287: URL: https://github.com/apache/iceberg/issues/13287
### Apache Iceberg version 1.5.2 ### Query engine Spark ### Please describe the bug 🐞 When executing: ```sql DELETE FROM xxx.yyy WHERE to_date(str_time, 'yyyy-MM-dd') = DATE('2024-08-04'); ``` I expected it to delete only the specific partition matching '2024-08-04', triggering a metadata-only delete. However, it ends up **deleting all rows in the table**. Subsequent scans (SELECT COUNT(*)) confirm the table is empty. Steps to reproduce: - Create an Iceberg table partitioned by a date-like column str_time or logical date transform. - Insert multiple rows across many partitions. - Run: ```sql SELECT COUNT(1) FROM xxx.yyy WHERE to_date(str_time, 'yyyy-MM-dd') = DATE('2024-08-04'); DELETE FROM xxx.yyy WHERE to_date(str_time, 'yyyy-MM-dd') = DATE('2024-08-04'); SELECT COUNT(1) FROM xxx.yyy; ```  ### Willingness to contribute - [ ] I can contribute a fix for this bug independently - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [ ] I cannot contribute a fix for this bug at this time -- 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-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org