-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql中text类型数据增量同步到starrocks后数据base64的问题 #28
Comments
func deserialize(raw interface{}, column schema.TableColumn) interface{} { |
是的,现在看只是判断了text 和 json,text类型应该是正常的 |
感谢回答。是的,text正常,然后json外部包裹了一层双引号。另外,请教个问题,全量的时候判断的是val.Type == 4 才转换,ai问了下这个好像是long型?也就对于text和json任然没有转换,为什么全量的没有问题呢,mediumtext等都正常。是不是我没看懂,或者遗漏了。今天看了大半天,才找到点眉目,还是很多看不懂 |
全量的时候使用的github.com/go-mysql-org/go-mysql包的ExecuteSelectStreaming 查询流,里面做了简单处理,把很多类型都默认归类到type =4,所以全量同步是没问题; 实时同步时行数据列类型使用的mysql原生的,导致判断少了,稍后我优化下 |
好的,感谢解惑。辛苦了 |
https://github.com/liuxinwang/go-mysql-starrocks/releases/tag/v0.6.3 json 问题可以先用filter:convert-dml-column 解决,不保证列顺序
|
好的 |
有两个问题:
1、text,longtext,mediumtext等同步到sr,如果是第一次全量同步,数据在sr展示正常,但是凡是增量同步的,到sr后就成base64了
mysql <----> starrocks
ext_info
mediumtext <---->ext_info
varchar(65533) 同步到sr后数据是base64的形式,与mysql不同了2、json问题
snapshot
json <---->snapshot
varchar(65533) 同步正常,两边数据一致,增量和增量都一致。snapshot
json <---->snapshot
json 源数据是{"a":123}变成"{"a":123}",外面被包裹双引号了,内部双引号转义了。全量和增量都是这样加了双引号包裹请问这种是同步问题还是sr的问题。没搞懂数据在哪儿变化的,在代码中没搜索到base64呢
The text was updated successfully, but these errors were encountered: