-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[HUDI-4629] Create hive table from existing hoodie table failed when the table schema is not defined #6409
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
base: master
Are you sure you want to change the base?
Conversation
|
@hudi-bot run azure |
…the table schema is not defined
| lazy val tableSchema: StructType = if (table.schema.nonEmpty) { | ||
| table.schema | ||
| } else { | ||
| val schemaFromMetaOpt = loadTableSchemaByMetaClient() |
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.
this already handled in parseSchemaAndConfigs() , isn't it?
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.
@jinxing64 can you also have a look pls? given this is based on your previous change
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.
this already handled in
parseSchemaAndConfigs(), isn't it?
yes
| * Table schema | ||
| */ | ||
| lazy val tableSchema: StructType = table.schema | ||
| lazy val tableSchema: StructType = if (table.schema.nonEmpty) { |
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.
I prefer to call loadTableSchemaByMetaClient directly without having to decide if table.schema is empty.
Parsing the metadata on spark does not need to depend on the meta from metastore.
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.
@YannByron The table.schema is not obtained from the hive metastore, but is specified by the user. Only when the user does not specify a schema, we can parse and obtain the schema from the file through the method loadTableSchemaByMetaClient
Create table
Create _rt table
Failed exception:
Related pr: [HUDI-4149] Drop-Table fails when underlying table directory is broken
Change Logs
Describe context and summary for this change. Highlight if any code was copied.
Impact
Describe any public API or user-facing feature change or any performance impact.
Risk level: none | low | medium | high
Choose one. If medium or high, explain what verification was done to mitigate the risks.
Contributor's checklist