cshuo opened a new pull request, #19245: URL: https://github.com/apache/hudi/pull/19245
### Describe the issue this Pull Request addresses Native log writes fail when the column stats index is enabled for a file format whose `HoodieFileWriter` does not expose file-format metadata. For example, ORC throws `UnsupportedOperationException` during metadata collection even though the native log file itself was written successfully. This PR aligns native ORC log behavior with the existing column stats behavior for ORC base files: ORC files that cannot provide column stats metadata are ignored instead of failing the write. ### Summary and Changelog - Remove format-specific column stats validation from `HoodieNativeLogAppendHandle` and `CommonClientUtils`. - Catch `UnsupportedOperationException` when `HoodieNativeLogFormatWriter` collects file-format metadata and return empty metadata for that append. - Align native ORC log handling with ORC base files, which are ignored when column stats metadata is unavailable. - Preserve metadata collection for supported writers and avoid requesting metadata when column stats are disabled. - Add tests covering supported metadata, unsupported metadata, and disabled column stats. - Re-enable the default column stats configuration in `TestHoodieFileGroupReaderOnSpark` for all tested formats. ### Impact - **Functional impact**: Native log writes continue successfully when the underlying format does not support column stats metadata. Consistent with ORC base files, these native log files are ignored by column stats collection. - **Maintainability**: Removes format-specific validation and handles the optional metadata capability at the writer boundary. - **Extensibility**: Additional native log formats can omit file-format metadata without requiring new validation branches. ### Risk Level Low. The change only suppresses `UnsupportedOperationException` from optional file-format metadata collection; other failures continue to propagate. Targeted `hudi-client-common` tests passed with 99 tests and no failures. ### Documentation Update none ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Enough context is provided in the sections above - [ ] Adequate tests were added if applicable -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
