Initial-neko opened a new issue #4238:
URL: https://github.com/apache/iceberg/issues/4238
table needs TTL, so a new parameter table.ttl is needed
The table needs to have an explicit time field DT. Get the table through
catalog,
`
long dt_lessThan = System.currentTimeMillis() - ttl * 24 * 3600 *
1000L;
LocalDateTime localDateTime =
LocalDateTime.ofInstant(Instant.ofEpochMilli(dt_lessThan),
ZoneId.systemDefault());
OffsetDateTime offsetDateTime =
localDateTime.atOffset(ZoneOffset.UTC);
String ttl_String =
offsetDateTime.format(DateTimeFormatter.ISO_DATE_TIME);
table
.newDelete()
.deleteFromRowFilter(Expressions.lessThanOrEqual("dt",
ttl_String))
.commit();`
--
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]