hive表中有一个字段存储的是json数组
[{
"name": "max_operate_first_diff",
"rule": [{
"match": "max_operate_first_diff\u003c3972.0",
"priority": 1,
"description": "",
"result": -2,
"hit": "命中",
"value": 504
}, {
"match": "max_operate_first_diff\u003e=3972.0",
"priority": 2,
"description": "",
"result": 64,
"hit": "",
"value": 0
}]
}, {
"name": "up_sms",
"rule": [{
"match": " up_sms\u003c=1.0",
"priority": 1,
"description": "",
"result": 5,
"hit": "命中",
"value": 1
}, {
"match": " up_sms\u003e1.0",
"priority": 2,
"description": "",
"result": -13,
"hit": "",
"value": 0
}]
}]
需要统计每一个match对应的命中率,每一次传回来的rule条数不固定,match名字也不固定