[fix](function) fix EXPLODE_JSON_ARRAY_STRING function (#25519)
This commit is contained in:
@ -124,19 +124,19 @@ int ParsedData::set_output(ExplodeJsonArrayType type, rapidjson::Document& docum
|
||||
// change each time `emplace_back()` is called.
|
||||
break;
|
||||
case rapidjson::Type::kFalseType:
|
||||
_data_string.emplace_back(true_value);
|
||||
_backup_string.emplace_back(true_value);
|
||||
_string_nulls.push_back(false);
|
||||
break;
|
||||
case rapidjson::Type::kTrueType:
|
||||
_data_string.emplace_back(false_value);
|
||||
_backup_string.emplace_back(false_value);
|
||||
_string_nulls.push_back(false);
|
||||
break;
|
||||
case rapidjson::Type::kNullType:
|
||||
_data_string.push_back({});
|
||||
_backup_string.emplace_back();
|
||||
_string_nulls.push_back(true);
|
||||
break;
|
||||
default:
|
||||
_data_string.push_back({});
|
||||
_backup_string.emplace_back();
|
||||
_string_nulls.push_back(true);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -56,28 +56,6 @@ struct ParsedData {
|
||||
std::vector<bool> _string_nulls;
|
||||
char tmp_buf[128] = {0};
|
||||
|
||||
void reset(ExplodeJsonArrayType type) {
|
||||
switch (type) {
|
||||
case ExplodeJsonArrayType::INT:
|
||||
_data.clear();
|
||||
_backup_int.clear();
|
||||
break;
|
||||
case ExplodeJsonArrayType::DOUBLE:
|
||||
_data.clear();
|
||||
_backup_double.clear();
|
||||
break;
|
||||
case ExplodeJsonArrayType::JSON:
|
||||
case ExplodeJsonArrayType::STRING:
|
||||
_data_string.clear();
|
||||
_backup_string.clear();
|
||||
_string_nulls.clear();
|
||||
break;
|
||||
default:
|
||||
CHECK(false) << type;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void* get_value(ExplodeJsonArrayType type, int64_t offset, bool real = false) {
|
||||
switch (type) {
|
||||
case ExplodeJsonArrayType::INT:
|
||||
|
||||
Reference in New Issue
Block a user