RussellSpitzer commented on issue #13287:
URL: https://github.com/apache/iceberg/issues/13287#issuecomment-2967942012
I'm unable to repro this. I wrote a quick test here
```java
@TestTemplate
public void testDeleteFromDatePartitionedTable() throws
NoSuchTableException {
sql(
"CREATE TABLE %s (id bigint, data string, date string) "
+ "USING iceberg "
+ "PARTITIONED BY (date)",
tableName);
List<Object[]> records = Lists.newArrayList(
row(1L, "a", "2024-08-01"),
row(2L, "b", "2024-08-02"),
row(3L, "c", "2024-08-03"),
row(4L, "d", "2024-08-04"),
row(5L, "e", "2024-08-05")
);
for (Object[] record : records) {
sql("INSERT INTO %s (id, data, date) VALUES (%s, '%s', '%s')",
tableName, record[0], record[1], record[2]);
}
assertEquals(
"Should have all rows before delete",
records,
sql("SELECT * FROM %s ORDER BY id", tableName));
sql("DELETE FROM %s WHERE to_date(date, 'yyyy-MM-dd') =
DATE('2024-08-04')", tableName);
List<Object[]> expectedAfterDelete = Lists.newArrayList(
row(1L, "a", "2024-08-01"),
row(2L, "b", "2024-08-02"),
row(3L, "c", "2024-08-03"),
row(5L, "e", "2024-08-05")
);
assertEquals(
"Should have all rows except 2024-08-04 partition",
expectedAfterDelete,
sql("SELECT * FROM %s ORDER BY id", tableName));
}
```
--
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]