This PR contain three things (#4448)
1. Fix core bug wild pointer in PlanFragmentExecutor, fix issue #4447 2. Fix core bug wild pointer json load, fix issue #4452 3. Change the declare order of ODBC type in thrift for compatibility
This commit is contained in:
@ -49,7 +49,7 @@ BrokerScanNode::~BrokerScanNode() {
|
||||
}
|
||||
|
||||
// We use the ParttitionRange to compare here. It should not be a member function of PartitionInfo
|
||||
// class becaurce there are some other member in it.
|
||||
// class because there are some other member in it.
|
||||
static bool compare_part_use_range(const PartitionInfo* v1, const PartitionInfo* v2) {
|
||||
return v1->range() < v2->range();
|
||||
}
|
||||
|
||||
@ -496,10 +496,14 @@ Status JsonReader::_handle_simple_json(Tuple* tuple, const std::vector<SlotDescr
|
||||
bool JsonReader::_write_values_by_jsonpath(rapidjson::Value& objectValue, MemPool* tuple_pool, Tuple* tuple, const std::vector<SlotDescriptor*>& slot_descs) {
|
||||
int nullcount = 0;
|
||||
bool valid = true;
|
||||
size_t column_num = std::min(slot_descs.size(), _parsed_jsonpaths.size());
|
||||
size_t column_num = slot_descs.size();
|
||||
|
||||
for (size_t i = 0; i < column_num; i++) {
|
||||
rapidjson::Value* json_values = JsonFunctions::get_json_array_from_parsed_json(_parsed_jsonpaths[i], &objectValue, _origin_json_doc.GetAllocator());
|
||||
rapidjson::Value* json_values = nullptr;
|
||||
if (LIKELY( i < _parsed_jsonpaths.size())) {
|
||||
json_values = JsonFunctions::get_json_array_from_parsed_json(_parsed_jsonpaths[i], &objectValue, _origin_json_doc.GetAllocator());
|
||||
}
|
||||
|
||||
if (json_values == nullptr) {
|
||||
// not match in jsondata.
|
||||
if (slot_descs[i]->is_nullable()) {
|
||||
|
||||
@ -48,6 +48,7 @@ namespace doris {
|
||||
PlanFragmentExecutor::PlanFragmentExecutor(
|
||||
ExecEnv* exec_env, const report_status_callback& report_status_cb)
|
||||
: _exec_env(exec_env),
|
||||
_plan(nullptr),
|
||||
_report_status_cb(report_status_cb),
|
||||
_report_thread_active(false),
|
||||
_done(false),
|
||||
|
||||
@ -26,7 +26,6 @@ include "Partitions.thrift"
|
||||
enum TPlanNodeType {
|
||||
OLAP_SCAN_NODE,
|
||||
MYSQL_SCAN_NODE,
|
||||
ODBC_SCAN_NODE,
|
||||
CSV_SCAN_NODE,
|
||||
SCHEMA_SCAN_NODE,
|
||||
HASH_JOIN_NODE,
|
||||
@ -50,7 +49,8 @@ enum TPlanNodeType {
|
||||
REPEAT_NODE,
|
||||
ASSERT_NUM_ROWS_NODE,
|
||||
INTERSECT_NODE,
|
||||
EXCEPT_NODE
|
||||
EXCEPT_NODE,
|
||||
ODBC_SCAN_NODE
|
||||
}
|
||||
|
||||
// phases of an execution node
|
||||
|
||||
@ -318,12 +318,12 @@ enum TEtlState {
|
||||
|
||||
enum TTableType {
|
||||
MYSQL_TABLE, // Deprecated
|
||||
ODBC_TABLE,
|
||||
OLAP_TABLE,
|
||||
SCHEMA_TABLE,
|
||||
KUDU_TABLE, // Deprecated
|
||||
BROKER_TABLE,
|
||||
ES_TABLE
|
||||
ES_TABLE,
|
||||
ODBC_TABLE
|
||||
}
|
||||
|
||||
enum TOdbcTableType {
|
||||
|
||||
Reference in New Issue
Block a user