cshuo opened a new pull request, #18873: URL: https://github.com/apache/hudi/pull/18873
### Describe the issue this Pull Request addresses The Flink RowData writer factory had a RowType-specific writer creation path that duplicated the parent `HoodieFileWriterFactory` schema-based dispatch. This made `HoodieRowDataFileWriterFactory` differ from the common writer factory mainly by passing `RowType` through several methods, even though the common API already uses `HoodieSchema`. This PR refactors the Flink RowData writer path to use `HoodieSchema` at the factory and write-support boundaries, deriving `RowType` only inside implementations that still need it for RowData parquet or Lance writing. ### Summary and Changelog - Removed the RowType-specific `HoodieRowDataFileWriterFactory#getFileWriter` and private RowType format dispatcher. - Updated RowData parquet writer creation to use the parent `HoodieSchema`-based `newParquetFileWriter` overrides. - Changed `RowDataParquetWriteSupport` and `HoodieRowDataParquetWriteSupport` constructors to accept `HoodieSchema`, deriving `RowType` internally. - Updated reflective loading of Flink RowData parquet write support to use `(Configuration, HoodieSchema, BloomFilter)`. - Updated `HoodieRowDataCreateHandle` and `TestHoodieRowDataParquetConfigInjector` to use schema-based writer creation. ### Impact - **Functional impact**: No intended behavior change for RowData parquet or Lance writes. - **Maintainability**: Reduces duplicate RowType-specific factory dispatch and aligns Flink RowData writer creation with the common writer factory API. - **Extensibility**: Keeps schema as the factory/write-support boundary, making future writer paths less dependent on Flink-specific types. ### Risk Level low. The main risk is constructor signature change for custom classes configured through `hoodie.parquet.flink.rowdata.write.support.class`. Verification included targeted Flink client tests and compile validation with the Flink 2.1 profile. ### 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]
