haruki-830 opened a new pull request, #4414:
URL: https://github.com/apache/flink-cdc/pull/4414
**Summary**
This commit adds complex data type coercion support to SchemaMergingUtils in
Flink CDC, enabling proper conversion of Array, Map, and Record types to STRING
format during schema merging operations. It also fixes compilation errors
caused by missing imports for ArrayData and JavaObjectConverter classes.
**Key Changes**
1. Complex Type String Coercion
- Enhanced coerceToString method in SchemaMergingUtils to handle complex
data types
- Added support for ArrayData type conversion to STRING
- Added support for MapData type conversion to STRING
- Added support for RecordData type conversion to STRING
- Utilizes JavaObjectConverter to convert internal CDC types to Java objects
before stringification
2. Missing Import Fixes
- Added missing import: org.apache.flink.cdc.common.data.ArrayData
- Added missing import:
org.apache.flink.cdc.common.converter.JavaObjectConverter
- Resolved compilation error: "ArrayData cannot be resolved to a type"
3. Comprehensive Testing
- Updated SchemaMergingUtilsTest with unit tests for complex type coercion
- Added FlinkPipelineBatchComposerITCase integration tests covering complex
type scenarios
- Total 180 lines changed across 3 files (179 insertions, 1 deletion)
**Supported Conversions**
ArrayData → Java List → String representation (e.g., "[Alice, Bob, Charlie]")
MapData → Java Map → String representation (e.g., "{key1=value1,
key2=value2}")
RecordData → Java List → String representation (e.g., "[field1, field2]")
**JIRA Reference**
[https://issues.apache.org/jira/browse/FLINK-39756](url)
--
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]