Athena Iceberg delete failing

1

I am trying to perform a fairly simple delete via Athena on a table defined with the tabletype of Iceberg.

delete from emaildelivery where uniqueid in (select b.uniqueid from deletestaging b)

The following error message is returned.

GENERIC_INTERNAL_ERROR: Invalid descendant for DeleteNode or UpdateNode: com.facebook.presto.sql.planner.plan.JoinNode

Performing the query with values directly in the query is successful.

delete from emaildelivery where uniqueid in ('6e41279b-a22d-4bad-ad8d-448625ae9d88','2831e5a1-8a5c-424f-8d07-198a57f6a04a')

The same query as a select works successfully.

select uniqueid from emaildelivery where uniqueid in (select b.uniqueid from deletestaging b);

Any assistance with resolving the issue with the delete query is greatly appreciated.

已提問 2 年前檢視次數 1357 次
4 個答案
1

Is there any update on this? I am currently stumbling on the same problem while testing Iceberg, and this is a key feature for our PoC.

已回答 2 年前
0

Hello, Thank you for brining on to the notice, Currently, this is a known issue only for DELETE and UPDATE. Athena Service team is actively working on it.

AWS
已回答 2 年前
0

Is there additional information related to when there will be a resolution to this issue?

已回答 2 年前
0

I had the same issue. The workaround which I found works for me is to use merge into .. with delete statement when there is a match. E.g. first create a table with the record ids that need to be deleted (emailtodelete). Then use it to delete the data from the original table.

MERGE INTO emaildelivery t USING emailtodelete s ON (t. uniqueid = s. uniqueid) WHEN MATCHED THEN DELETE

MikeW
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南