XuQianJin-Stars opened a new pull request, #1987: URL: https://github.com/apache/fluss/pull/1987
### Purpose Linked issue: close https://github.com/apache/fluss/issues/1972 This PR removes the `getMap()` and `getRow()` methods from `DataGetters` interface and all implementing classes, as these methods are not yet fully supported and will be added later in Issue #1973 (Map support) and Issue #1974 (Row support). Additionally, this PR improves test coverage for array-related classes to meet the 70% coverage requirement. ### Brief change log **API Changes:** - Removed `getMap(int pos)` method from `DataGetters` interface and all implementations (9 classes: BinaryArray, GenericArray, GenericRow, IndexedRow, AlignedRow, ProjectedRow, ColumnarRow, ColumnarArray, CompactedRow) - Removed `getRow(int pos, int numFields)` method from `DataGetters` interface and all implementations - Updated `InternalArray.createElementGetter()` to throw `IllegalArgumentException` for MAP and ROW types - Updated `InternalRow.createFieldGetter()` to throw `IllegalArgumentException` for MAP and ROW types - Removed `getMap()` and `getRow()` helper methods from `VectorizedColumnBatch` - Added TODO comments indicating these features will be added in Issue #1973 and #1974 **Test Improvements:** - InternalArraySerializer: Added 3 new tests (23 total tests, coverage: 68% → 70%+) - BinaryArray: Added 3 new tests (64 total tests, coverage: 57% → 60%+) - BinarySegmentUtils: Added 12 new tests (31 total tests, coverage: 45% → 70%+) - Removed/commented out tests that depended on `getMap()` and `getRow()` methods: - `InternalArrayTest.testElementGetterForMap()` and `testElementGetterForRow()` - `GenericArrayTest.testNestedRow()` - Updated `InternalArrayAssert` to handle MAP type as unsupported **Code Cleanup:** - Removed unused imports: `InternalMap`, `InternalRow`, `DataTypeRoot`, `DataField`, `DataTypeChecks` - Removed unused private method `getDataTypes()` from IndexedRow ### Tests **Unit Tests:** - All existing tests pass (1244 tests) - New tests added: - `InternalArraySerializerTest`: `testToBinaryArrayFromGenericArrayWithBytes`, `testEqualsWithNull`, `testCopyGenericArrayAllNulls` - `BinaryArrayTest`: `testGetSizeInBytes`, `testCopyWithMultipleTypes`, `testHashCodeConsistency` - `BinarySegmentUtilsTest`: `testSetBoolean/Byte/Short/Int/Float/Double`, `testBitSetAndUnSet`, `testReadBinary`, `testCopyToBytes` - Coverage verification: `mvn clean verify -pl fluss-test-coverage` passes with all classes meeting 70% coverage requirement ### API and Format **API Changes (Breaking):** - Removed public methods `getMap()` and `getRow()` from `DataGetters` interface - This is acceptable as these methods were not fully implemented and documented as "will be added in future issues" - Applications using these methods will need to wait for Issue #1973 and #1974 implementation **No format changes.** ### Documentation - Added TODO comments in code referencing Issue #1973 (Map support) and Issue #1974 (Row support) - No user-facing documentation changes required as these features were marked as future work -- 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]
