Issues with Field Type Conversion in Flink CDC TiDB

This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 关于Flink CDC TiDB字段类型转换的问题

| username: TIDB救我狗命

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]
In FlinkCDC, when retrieving the value of a varbinary type field, the varbinary is recognized as TypeVarchar, causing the original binary content to be processed as a String, ultimately resulting in incorrect field values. Is there a way to handle this issue?

| username: TIDB救我狗命 | Original post link

This is the correct binary value, but after being converted by TypeVarchar, it becomes

| username: TIDB救我狗命 | Original post link

The value has been completely changed…

| username: TIDB救我狗命 | Original post link

After entering this judgment, the original byte array is directly cast to a String and can no longer be restored.