yihua opened a new pull request, #13276: URL: https://github.com/apache/hudi/pull/13276
### Change Logs This PR moves the index enabling condition to `MetadataPartitionType` so that they are all kept in the same class. Specifically, - New API `MeadataPartitionType#isMetadataPartitionSupported` is added for each partition type to check against table properties (e.g., is partitioned, table version) and return if the metadata partition is supported; if not, it should not be enabled by the metadata writer - Moves `MeadataPartitionType#getEnabledPartitions` to `HoodieBackedTableMetadataWriter` for simplicity - Makes `MetadataPartitionType#getValidValues` protected to limit usage in the package - Removes `PARTITION_STATS` support check in `HoodieBackedTableMetadataWriter` which is now incorporated in `MeadataPartitionType` and `HoodieBackedTableMetadataWriter#getEnabledPartitions` - Removes overridden implementation of `HoodieBackedTableMetadataWriterTableVersionSix#getEnabledPartitions` which is now the same as table version 8 writer - Removes `HoodieTableConfig#setMetadataPartitionsInflight` which is redundant after refactoring - Tests are added and adjusted to coverage the logic ### Impact Code refactoring to reduce complexity for subsequent MDT writer refactoring. ### Risk level none ### Documentation Update N/A ### Contributor's checklist - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [ ] Change Logs and Impact were stated clearly - [ ] Adequate tests were added if applicable - [ ] CI passed -- 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]
