anushshetty3010 opened a new issue, #15611:
URL: https://github.com/apache/iceberg/issues/15611
### Query engine
Spark Engine
### Question
Hi all,I am utilizing the Spark Action API to implement snapshot retention
optimization through the relevant APIs. However, I have observed that while the
snapshot metadata files (snap- files) are being deleted as expected, the
corresponding data files associated with these snapshots remain intact and are
not removed. Could you help me understand the underlying reason for this
behavior? Any help would be appreciated.
// Expire snapshots older than current time, retain at least 1
val orphanFileThreshold = java.time.LocalDateTime.now().minusMinutes(2)
.toInstant(java.time.ZoneOffset.UTC)
.toEpochMilli
val expireResult = SparkActions.get()
.expireSnapshots(table).expireOlderThan(orphanFileThreshold)
.retainLast(5).expireFiles()
Regards
Anush
--
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]