You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "hudi-bot (via GitHub)" <gi...@apache.org> on 2025/11/30 08:07:33 UTC
[I] failed to delete from an empty table again [hudi]
hudi-bot opened a new issue, #16026:
URL: https://github.com/apache/hudi/issues/16026
Could not execute delete operation twice for an empty table.
How to reproduce:
{code:java}
create table hudi_cow ( uuid int, name string) using hudi tblproperties ( primaryKey = 'uuid');
delete from hudi_cow where 1!=1;
// delete again
delete from hudi_cow where 1!=1; {code}
Error message:
{code:java}
org.apache.hudi.exception.HoodieIOException: Latest commit does not have any schema in commit metadata
at org.apache.hudi.client.BaseHoodieWriteClient.setWriteSchemaForDeletes(BaseHoodieWriteClient.java:1255)
at org.apache.hudi.client.BaseHoodieWriteClient.initTable(BaseHoodieWriteClient.java:1207)
at org.apache.hudi.client.SparkRDDWriteClient.delete(SparkRDDWriteClient.java:242)
at org.apache.hudi.DataSourceUtils.doDeleteOperation(DataSourceUtils.java:227)
at org.apache.hudi.HoodieSparkSqlWriter$.write(HoodieSparkSqlWriter.scala:287)
at org.apache.hudi.DefaultSource.createRelation(DefaultSource.scala:153) {code}
## JIRA info
- Link: https://issues.apache.org/jira/browse/HUDI-6378
- Type: Bug
--
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: commits-unsubscribe@hudi.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] failed to delete from an empty table again [hudi]
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan commented on issue #16026:
URL: https://github.com/apache/hudi/issues/16026#issuecomment-4795519508
This appears to be fixed on current master by [PR #18030](https://github.com/apache/hudi/pull/18030) (commit `21eb05e7`), which rewrote `BaseHoodieWriteClient.setWriteSchemaForDeletes` to use `TableSchemaResolver.getTableSchemaIfPresent(false)` instead of reading the latest commit metadata directly. The resolver has a fallback chain that tries `tableConfig.getTableCreateSchema()` when commit metadata has no schema, and since Spark SQL `CREATE TABLE` already persists `CREATE_SCHEMA` in table config (`HoodieCatalogTable.scala:235`), the second `DELETE FROM ... WHERE 1!=1` should now succeed instead of throwing `Latest commit does not have any schema in commit metadata`. Could you verify on a current build and close the issue / HUDI-6378 if confirmed?
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] failed to delete from an empty table again [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on issue #16026:
URL: https://github.com/apache/hudi/issues/16026#issuecomment-3630165980
### Linked PR(s)
- https://github.com/apache/hudi/pull/8967
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] failed to delete from an empty table again [hudi]
Posted by "nsivabalan (via GitHub)" <gi...@apache.org>.
nsivabalan closed issue #16026: failed to delete from an empty table again
URL: https://github.com/apache/hudi/issues/16026
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org