Skip to content

Conversation

linliu-code
Copy link
Contributor

@linliu-code linliu-code commented Oct 16, 2025

Describe the issue this Pull Request addresses

#14108

Column valueType is added to ColumnStats record in recent change in master branch (1.1.x version), as causes backward compatibility issue since old ColumnStats records do not have this column. That is, when MDT tries to access this column from these old records say from 1.0.2 version, they would throw exception saying org.apache.avro.AvroRuntimeException: Not a valid schema field: valueType.

The reason that these old record would use their writer schema is because they are from log files of MDT that contains their writer schema in the log block header. When these log records are deserialized, the old writer schema is used.

Summary and Changelog

The solution is to check if valueType column exists in current records before access. If not exists, we return V1EmptyMetadata object instead.

I see we also return V1EmptyMetadata object when the value of valueType is NULL. Therefore, after V1EmptyMetadata is returned, the sequential operations should be handled properly.

Impact

Fix one compatibility issue after upgrade to version 9.

Risk Level

Low.

Documentation Update

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

@linliu-code linliu-code changed the base branch from master to release-1.1.0 October 16, 2025 19:39
@github-actions github-actions bot added the size:XS PR with lines of changes in <= 10 label Oct 16, 2025
@linliu-code linliu-code changed the title fix: Handle valueMetadata properly after upgrade fix: Handle missing valueType column after upgrade Oct 16, 2025
@linliu-code linliu-code changed the base branch from release-1.1.0 to master October 17, 2025 03:23
@linliu-code linliu-code marked this pull request as ready for review October 17, 2025 04:01
@linliu-code linliu-code force-pushed the debugging-rc1-bug branch 2 times, most recently from 1c529bf to 3d6c731 Compare October 17, 2025 12:25
Copy link
Contributor

@nsivabalan nsivabalan left a comment

Choose a reason for hiding this comment

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

Can we add a test fixture based test?

@hudi-bot
Copy link

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

size:XS PR with lines of changes in <= 10

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants