Fix load data bug for json type

This commit is contained in:
wjhh2008
2024-02-07 17:22:56 +00:00
committed by ob-robot
parent c66cbc28a9
commit df5ef10e8f
5 changed files with 183 additions and 81 deletions

View File

@ -501,7 +501,7 @@ int ObLoadDataResolver::resolve_hints(const ParseNode &node)
break;
}
case T_LOAD_BATCH_SIZE: {
if (1 != hint_node->num_child_) {
if (2 != hint_node->num_child_) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("max concurrent node should have 1 child", K(ret));
} else if (OB_ISNULL(hint_node->children_[0])) {
@ -510,6 +510,11 @@ int ObLoadDataResolver::resolve_hints(const ParseNode &node)
} else if (OB_FAIL(stmt_hints.set_value(
ObLoadDataHint::BATCH_SIZE, hint_node->children_[0]->value_))) {
LOG_WARN("fail to set concurrent value", K(ret));
} else if (OB_NOT_NULL(hint_node->children_[1])
&& OB_FAIL(stmt_hints.set_value(ObLoadDataHint::BATCH_BUFFER_SIZE,
ObString(hint_node->children_[1]->str_len_,
hint_node->children_[1]->str_value_)))) {
LOG_WARN("fail to set concurrent value", K(ret));
}
break;
}

View File

@ -190,6 +190,7 @@ public:
};
enum StringHintItem {
LOG_LEVEL,
BATCH_BUFFER_SIZE,
TOTAL_STRING_ITEM
};
void reset()