兼容性判定
公开资料依据 · 建议 PoC 复核支持度partial
严重度minor
置信度medium
依据规则my.syntax.json_arrow_text
怎么改
按目标 JSON path 接口显式取文本,避免把同名 ->> 当作路径语义等价
判定说明
Dolphin 支持 JSON ->> 文本取值,标量反引号、NULL 和字符集行为需核对;结论为 doc_based 草案,建议 PoC 复核
库侧 / 应用侧路径
库侧改造
可行:改目标 JSON 取文本函数/操作符并显式处理缺键和 NULL
应用侧改造
可行:在 Mapper 或应用查询层逐处改写 JSON path
推荐路线:case_by_case。验证建议:对照对象、数组、缺键、JSON null、SQL NULL 与字符集返回值
规则样例
SELECT doc->>'$.name' FROM t
SELECT payload->>'$.items[0].sku' FROM msg
SELECT payload->'$.user.id' FROM msg
参考来源
- https://docs.opengauss.org/zh/docs/6.0.0/docs/SQLReference/SELECT.html
- https://docs.opengauss.org/zh/docs/6.0.0/docs/ExtensionReference/dolphin-%E4%B8%8D%E6%94%AF%E6%8C%81%E8%AF%AD%E6%B3%95.html
- https://docs.opengauss.org/zh/docs/6.0.0/docs/ExtensionReference/dolphin-Extension.html
- https://github.com/opengauss-mirror/Plugin/tree/e3a0cf2ae9bbcee1aa103497f6eca1b1152a4146/contrib/dolphin
- https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#operator_json-inline-path
相关改造点
- MYSQL → opengauss 6.0 B 模式 全部改造点
- opengauss 6.0 B 模式 兼容性总览
- MYSQL 迁移国产库总览
- MYSQL GET_LOCK / RELEASE_LOCK 咨询锁函数 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL ALTER TABLE ALGORITHM= / LOCK= 在线 DDL 子句 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL ALTER TABLE 增删主键限制 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL AUTO_INCREMENT 自增列 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL 表/列级 CHARSET 与 COLLATE 子句 迁移 opengauss 6.0 B 模式 怎么改
- MYSQL CHECK 约束执行与静默忽略差异 迁移 opengauss 6.0 B 模式 怎么改