HappenLee commented on code in PR #33904: URL: https://github.com/apache/doris/pull/33904#discussion_r1576182132
########## be/src/vec/exprs/table_function/vexplode_json_array.h: ########## @@ -19,85 +19,231 @@ #include <glog/logging.h> #include <rapidjson/document.h> -#include <stddef.h> -#include <stdint.h> #include <ostream> #include <string> #include <vector> #include "common/status.h" #include "gutil/integral_types.h" +#include "rapidjson/stringbuffer.h" +#include "rapidjson/writer.h" #include "vec/common/string_ref.h" +#include "vec/core/types.h" #include "vec/data_types/data_type.h" #include "vec/exprs/table_function/table_function.h" -namespace doris { -namespace vectorized { -class Block; -} // namespace vectorized -} // namespace doris - namespace doris::vectorized { -enum ExplodeJsonArrayType { INT = 0, DOUBLE, STRING, JSON }; - +template <typename T> struct ParsedData { - static std::string true_value; - static std::string false_value; + ParsedData() = default; + virtual ~ParsedData() = default; + virtual void reset() = 0; + virtual int set_output(rapidjson::Document& document, int value_size) = 0; + virtual void insert_result_from_parsed_data(MutableColumnPtr& column, int max_step, + int64_t cur_offset) = 0; + const char* get_null_flag_address(int cur_offset) { + return reinterpret_cast<const char*>(_values_null_flag.data() + cur_offset); + } + std::vector<UInt8> _values_null_flag; Review Comment: std::vector<T> _backup -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org