morrySnow opened a new pull request, #62312: URL: https://github.com/apache/doris/pull/62312
### What problem does this PR solve? Problem Summary: The `toThrift()` methods on `SlotDescriptor`, `TupleDescriptor`, and `DescriptorTable` mix serialization logic with domain model classes. Following the same pattern as `FunctionToThriftConverter`, this PR extracts all three `toThrift()` methods into a new `DescriptorToThriftConverter` utility class, keeping the domain classes focused on their core responsibilities. **Changes:** - Created `DescriptorToThriftConverter` as a `final` utility class with private constructor and 3 static `toThrift` overloads - Created `DescriptorToThriftConverterTest` with 17 unit tests covering all code paths - Updated all 11 call sites across 7 files to use `DescriptorToThriftConverter.toThrift()` - Removed `toThrift()` from `SlotDescriptor`, `TupleDescriptor`, and `DescriptorTable` - Added necessary getters: `getMaterializedColumnName()`, `getThriftDescTable()`, `getTupleDescs()` - Cleaned up unused imports (`TSlotDescriptor`, `TTupleDescriptor`, `TableIf`, `Logger/LogManager`) ### Release note None ### Check List (For Author) - Test: Unit Test (DescriptorToThriftConverterTest with 17 test cases) - Behavior changed: No - Does this need documentation: No -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
