[ https://issues.apache.org/jira/browse/HUDI-6378?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
lvyanquan updated HUDI-6378: ---------------------------- Description: 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} was: Could not execute delete operation twice for an empty table. How to reproduce: {code:java} create table hudi_cow ( uuid int, name string) using huditblproperties ( 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} > failed to delete from an empty table again > ------------------------------------------ > > Key: HUDI-6378 > URL: https://issues.apache.org/jira/browse/HUDI-6378 > Project: Apache Hudi > Issue Type: Bug > Reporter: lvyanquan > Priority: Major > > 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} -- This message was sent by Atlassian Jira (v8.20.10#820010)