Optimize json functions (#1177)

1. get_json_xxx() now support using quoto to escape dot
2. Implement json_path_prepare() function to preprocess json_path

Performance of get_json_string() on 1000000 rows reduces from 2.27s to 0.27s
This commit is contained in:
Mingyu Chen
2019-05-21 09:13:12 +08:00
committed by ZHAO Chun
parent ff2746157e
commit 722a9e71c7
11 changed files with 359 additions and 52 deletions

View File

@ -69,6 +69,8 @@ Status KafkaDataConsumer::init(StreamLoadContext* ctx) {
// TODO: set it larger than 0 after we set rd_kafka_conf_set_stats_cb()
RETURN_IF_ERROR(set_conf("statistics.interval.ms", "0"));
RETURN_IF_ERROR(set_conf("auto.offset.reset", "error"));
RETURN_IF_ERROR(set_conf("api.version.request", "true"));
RETURN_IF_ERROR(set_conf("api.version.fallback.ms", "0"));
if (conf->set("event_cb", &_k_event_cb, errstr) != RdKafka::Conf::CONF_OK) {
std::stringstream ss;