Skip to content

[HUDI-7033] Fix read error for schema evolution + partition value ext…#9994

Merged
bvaradar merged 1 commit intoapache:masterfrom
voonhous:HUDI-7033_fix_read_error_for_hfse
Nov 8, 2023
Merged

[HUDI-7033] Fix read error for schema evolution + partition value ext…#9994
bvaradar merged 1 commit intoapache:masterfrom
voonhous:HUDI-7033_fix_read_error_for_hfse

Conversation

@voonhous
Copy link
Member

@voonhous voonhous commented Nov 6, 2023

…raction

After HUDI-6960 is merged PR #9889, the shouldExtractPartitionValuesFromPartitionPath will correctly ignore partition columns in requiredSchema.

When using the configs below, there will be read errors.

hoodie.datasource.read.extract.partition.values.from.path = true 
hoodie.schema.on.read.enable = true 

 
The query schema will be pruned to NOT contain any partition columns.
 
When rebuilding parquet filters, file schema's columns are scanned against querySchema. However, Hudi files (file schema) might still contain partition columns. And when partition filters are being rebuilt with these file schema against query schema, it will lead to partition columns not being found.
 

Caused by: java.lang.IllegalArgumentException: cannot found filter col name:region from querySchema: table {
 5: id: optional int
 6: name: optional string
 7: ts: optional long
}
at org.apache.hudi.internal.schema.utils.InternalSchemaUtils.reBuildFilterName(InternalSchemaUtils.java:180)

Change Logs

Fixes schema evolution read error when partition values are extracted from path.
Describe context and summary for this change. Highlight if any code was copied.

Impact

None
Describe any public API or user-facing feature change or any performance impact.

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

If medium or high, explain what verification was done to mitigate the risks.

Documentation Update

Describe any necessary documentation update if there is any new feature, config, or user-facing change

  • The config description must be updated if new configs are added or the default value of the configs are changed
  • Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
    ticket number here and follow the instruction to make
    changes to the website.

Contributor's checklist

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

@hudi-bot
Copy link
Collaborator

hudi-bot commented Nov 7, 2023

CI report:

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

@bvaradar bvaradar self-assigned this Nov 8, 2023
Copy link
Contributor

@bvaradar bvaradar left a comment

Choose a reason for hiding this comment

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

THanks for the fix @voonhous . LGTM.

@bvaradar bvaradar merged commit a4fa345 into apache:master Nov 8, 2023
nsivabalan pushed a commit to nsivabalan/hudi that referenced this pull request Nov 23, 2023
@nsivabalan nsivabalan added release-0.14.1 priority:critical Production degraded; pipelines stalled labels Nov 30, 2023
@voonhous voonhous deleted the HUDI-7033_fix_read_error_for_hfse branch January 16, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:critical Production degraded; pipelines stalled release-0.14.1

Projects

Status: 🆕 New

Development

Successfully merging this pull request may close these issues.

4 participants