Skip to content

Conversation

@lvyanquan
Copy link
Contributor

@lvyanquan lvyanquan commented Jun 14, 2023

Change Logs

delete operation will use schema of lastInstant.
Howerver, if last commit is deletion on an empty table, schema will be "" string, if we throw exception now, we could not execute idempotent deletion.
Add a test for this situation.

relevant pr #5610

Impact

fix bug for deletion from an empty table.

Risk level (write none, low medium or high below)

low

Contributor's checklist

  • Read through contributor's guide
  • Change Logs and Impact were stated clearly
  • Adequate tests were added if applicable
  • CI passed

@lvyanquan
Copy link
Contributor Author

@KnightChess
Hi, can you help me to evaluate this change is correct.

@yihua yihua added the area:sql SQL interfaces label Jun 14, 2023
throw new HoodieIOException("Latest commit does not have any schema in commit metadata");
}
} else {
String schemaStr = new TableSchemaResolver(metaClient).getTableAvroSchema().toString();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole method can be replaced by the new logic with try-catch block:

String schemaStr = new TableSchemaResolver(metaClient).getTableAvroSchema().toString();
config.setSchema(schemaStr);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

address it.

@yihua
Copy link
Contributor

yihua commented Jun 16, 2023

LGTM. @lvyanquan could you check the test failures?

@lvyanquan
Copy link
Contributor Author

@hudi-bot run azure

@github-actions github-actions bot added the size:S PR with lines of changes in (10, 100] label Feb 26, 2024
@hudi-bot
Copy link
Collaborator

hudi-bot commented Mar 9, 2024

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:sql SQL interfaces size:S PR with lines of changes in (10, 100]

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

4 participants