binary-signal opened a new pull request, #2166: URL: https://github.com/apache/fluss/pull/2166
### Purpose <!-- What is the purpose of the change --> This PR adds support for ARRAY data types in the Fluss Lake Paimon integration. Previously, attempting to use array types when tiering data to Paimon would throw an `UnsupportedOperationException`. This change enables proper conversion between Fluss and Paimon array types in both directions. ### Brief change log <!-- Please describe the changes made in this pull request and explain how they address the issue --> - **Added `FlussArrayAsPaimonArray`**: Adapter class that wraps `org.apache.fluss.row.InternalArray` and implements `org.apache.paimon.data.InternalArray`, enabling Fluss arrays to be read as Paimon arrays. - **Added `PaimonArrayAsFlussArray`**: Adapter class that wraps `org.apache.paimon.data.InternalArray` and implements `org.apache.fluss.row.InternalArray`, enabling Paimon arrays to be read as Fluss arrays. - **Updated `FlussRowAsPaimonRow.getArray()`**: Now returns a `FlussArrayAsPaimonArray` wrapper instead of throwing `UnsupportedOperationException`. - **Updated `PaimonRowAsFlussRow.getArray()`**: Now returns a `PaimonArrayAsFlussArray` wrapper instead of throwing `UnsupportedOperationException`. ### Tests <!-- List UT and IT cases to verify this change --> **FlussRowAsPaimonRowTest** (new test methods): - `testArrayTypeWithIntElements()` - Tests array of integers - `testArrayTypeWithStringElements()` - Tests array of strings - `testArrayTypeWithNullableElements()` - Tests array with null elements - `testNullArray()` - Tests null array field - `testNestedArrayType()` - Tests nested arrays (`ARRAY<ARRAY<INT>>`) - `testEmptyArray()` - Tests empty array **PaimonRowAsFlussRowTest** (new test class): - `testArrayTypeWithIntElements()` - Tests array of integers - `testArrayTypeWithStringElements()` - Tests array of strings - `testArrayTypeWithNullableElements()` - Tests array with null elements - `testNullArray()` - Tests null array field - `testNestedArrayType()` - Tests nested arrays - `testEmptyArray()` - Tests empty array - `testReplaceRow()` - Tests row replacement with arrays - `testArrayWithLongElements()` - Tests array of longs - `testArrayWithDoubleElements()` - Tests array of doubles - `testArrayWithBooleanElements()` - Tests array of booleans **FlussRecordAsPaimonRowTest** (new test methods): - `testArrayTypeWithIntElements()` - Tests array with system columns in tiering context - `testArrayTypeWithStringElements()` - Tests string arrays in tiering context - `testNestedArrayType()` - Tests nested arrays in tiering context ### API and Format <!-- Does this change affect API or storage format --> No. This change is an internal implementation that enables existing array type support to work correctly with Paimon tiering. No public API changes. ### Documentation <!-- Does this change introduce a new feature --> No documentation changes required. Array types were already documented as a supported data type; this PR fixes the implementation to actually support them in the Paimon lake integration. -- 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]
