-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4113] Fix cannot parse <null> schema when use spark delete sql #5610
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
nsivabalan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we write a test to validate the fix please.
| // Create a HoodieWriteClient & issue the delete. | ||
| val tableMetaClient = HoodieTableMetaClient.builder | ||
| .setConf(sparkContext.hadoopConfiguration).setBasePath(basePath.toString).build() | ||
| val schemaStr = new TableSchemaResolver(tableMetaClient).getTableAvroSchema.toString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also fix L197.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for delete op, there has special logic in https://github.com/apache/hudi/blob/master/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java#L1437
will use last instant schema
|
thanks for the fix! |
69987db to
5a591f8
Compare
codope
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We can land once the CI is green.
…5610) - Alter table drop partition will not add schema to instant. If using delete sql, will get latest instant to get schema, which is "". This PR fixes the parsing of null or empty schema. Co-authored-by: Sagar Sumit <sagarsumit09@gmail.com>
…pache#5610) - Alter table drop partition will not add schema to instant. If using delete sql, will get latest instant to get schema, which is "". This PR fixes the parsing of null or empty schema. Co-authored-by: Sagar Sumit <sagarsumit09@gmail.com>
…pache#5610) - Alter table drop partition will not add schema to instant. If using delete sql, will get latest instant to get schema, which is "". This PR fixes the parsing of null or empty schema. Co-authored-by: Sagar Sumit <sagarsumit09@gmail.com>
Change Logs
after alter table drop partition, will not add schema to Instance.
now, if use delete sql, will get latest instant to get schema, it's ""
before: replacecommit instant extraMetadata
after: replacecommit instant extraMetadata
Impact
Fix cannot parse schema when use spark delete sql.
Risk level (write none, low medium or high below)
low
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist