You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "haruki-830 (via GitHub)" <gi...@apache.org> on 2026/05/26 04:02:14 UTC

[PR] [FLINK-39756] Fix unable to coerce complex types to STRING [flink-cdc]

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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39756] Fix unable to coerce complex types to STRING [flink-cdc]

Posted by "haruki-830 (via GitHub)" <gi...@apache.org>.
haruki-830 commented on PR #4414:
URL: https://github.com/apache/flink-cdc/pull/4414#issuecomment-4539910653

   @lvyanquan 


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-39756] Fix unable to coerce complex types to STRING [flink-cdc]

Posted by "lvyanquan (via GitHub)" <gi...@apache.org>.
lvyanquan merged PR #4414:
URL: https://github.com/apache/flink-cdc/pull/4414


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org