为了更快的定位您的问题,请提供以下信息,谢谢
【详述】问题详细描述
create table test_json( a int, b json, c varchar(65535));
insert into test_json values(1,’[{“propertyKey”:“货号”,“propertyValue”:“跨拳道服”,“keyPoint”:null},{“propertyKey”:“销售渠道类型”,“propertyValue”:“商场同款(线上线下都销售)”,“keyPoint”:null},{“propertyKey”:“品牌”,“propertyValue”:“tianquan/天拳体育”,“keyPoint”:null},{“propertyKey”:“是否商场同款”,“propertyValue”:“是”,“keyPoint”:null},{“propertyKey”:“上市时间”,“propertyValue”:“2021年夏季”,“keyPoint”:null},{“propertyKey”:“适用对象”,“propertyValue”:“儿童”,“keyPoint”:null},{“propertyKey”:“尺码”,“propertyValue”:“xxxs xxs xs s m l xl xxl xxxl”,“keyPoint”:null}]’,’[{“propertyKey”:“货号”,“propertyValue”:“跨拳道服”,“keyPoint”:null},{“propertyKey”:“销售渠道类型”,“propertyValue”:“商场同款(线上线下都销售)”,“keyPoint”:null},{“propertyKey”:“品牌”,“propertyValue”:“tianquan/天拳体育”,“keyPoint”:null},{“propertyKey”:“是否商场同款”,“propertyValue”:“是”,“keyPoint”:null},{“propertyKey”:“上市时间”,“propertyValue”:“2021年夏季”,“keyPoint”:null},{“propertyKey”:“适用对象”,“propertyValue”:“儿童”,“keyPoint”:null},{“propertyKey”:“尺码”,“propertyValue”:“xxxs xxs xs s m l xl xxl xxxl”,“keyPoint”:null}]’);
数据:
| 1 | [{“keyPoint”: null, “propertyKey”: “货号”, “propertyValue”: “跨拳道服”}, {“keyPoint”: null, “propertyKey”: “销售渠道类型”, “propertyValue”: “商场同款(线上线下都销售)”}, {“keyPoint”: null, “propertyKey”: “品牌”, “propertyValue”: “tianquan/天拳体育”}, {“keyPoint”: null, “propertyKey”: “是否商场同款”, “propertyValue”: “是”}, {“keyPoint”: null, “propertyKey”: “上市时间”, “propertyValue”: “2021年夏季”}, {“keyPoint”: null, “propertyKey”: “适用对象”, “propertyValue”: “儿童”}, {“keyPoint”: null, “propertyKey”: “尺码”, “propertyValue”: “xxxs xxs xs s m l xl xxl xxxl”}] | [{“propertyKey”:“货号”,“propertyValue”:“跨拳道服”,“keyPoint”:null},{“propertyKey”:“销售渠道类型”,“propertyValue”:“商场同款(线上线下都销售)”,“keyPoint”:null},{“propertyKey”:“品牌”,“propertyValue”:“tianquan/天拳体育”,“keyPoint”:null},{“propertyKey”:“是否商场同款”,“propertyValue”:“是”,“keyPoint”:null},{“propertyKey”:“上市时间”,“propertyValue”:“2021年夏季”,“keyPoint”:null},{“propertyKey”:“适用对象”,“propertyValue”:“儿童”,“keyPoint”:null},{“propertyKey”:“尺码”,“propertyValue”:“xxxs xxs xs s m l xl xxl xxxl”,“keyPoint”:null}] | [“货号”, “销售渠道类型”, “品牌”, “是否商场同款”, “上市时间”, “适用对象”, “尺码”] |
执行sql:
mysql> select array_sort(cast(json_query(b, ‘$[].propertyKey’) as array)) from test_json;
±-----------------------------------------------------------------------------------------------------+
| array_sort(CAST((json_query(b, '$[].propertyKey’)) AS ARRAY)) |
±-----------------------------------------------------------------------------------------------------+
| [“上市时间”,“品牌”,“尺码”,“是否商场同款”,“货号”,“适用对象”,“销售渠道类型”] |
±-----------------------------------------------------------------------------------------------------+
1 row in set (0.01 sec)
中文排序没有顺序 上市时间(s) 品牌§ 尺码© 是否商场同款(s) 货号(h) 适用对象(s) 销售(x)
【背景】做过哪些操作?
【业务影响】
【是否存算分离】
【StarRocks版本】例如:3.3.14
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】为了在解决问题过程中能及时联系到您获取一些日志信息,请补充下您的联系方式,例如:社区群16-可乐鸡或者邮箱,谢谢
【附件】
- fe.log/beINFO/相应截图
- 慢查询:
- Profile信息,获取Profile,通过Profile分析查询瓶颈
- 并行度:show variables like ‘%parallel_fragment_exec_instance_num%’;
- pipeline是否开启:show variables like ‘%pipeline%’;
- be节点cpu和内存使用率截图
- 查询报错:
- query_dump,怎么获取query_dump文件
- be crash
- be.out
- coredump,如何获取coredump
- 外表查询报错
- be.out和fe.warn.log