bugfix:47099280, 47725591, 47679463, 47077540, 47024555

This commit is contained in:
obdev
2023-02-13 12:41:36 +00:00
committed by ob-robot
parent 331b873fb3
commit ff893e6e4f
7 changed files with 49 additions and 13 deletions

View File

@ -651,7 +651,8 @@ int ObExprJsonValue::doc_do_seek(ObJsonBaseVector &hits, bool &is_null_result, O
} else if (j_path->is_last_func()) {
if (j_path->get_last_node_type() == ObJsonPathNodeType::JPN_BOOLEAN
&& hits[0]->json_type() != ObJsonNodeType::J_BOOLEAN) {
if (hits[0]->json_type() == ObJsonNodeType::J_INT
if ((hits[0]->json_type() == ObJsonNodeType::J_INT
&& (hits[0]->get_int() == 1 || hits[0]->get_int() == 0) )
|| (hits[0]->json_type() == ObJsonNodeType::J_DOUBLE
&& (hits[0]->get_double() == 1.0 || hits[0]->get_double() == 0.0))) {
bool is_true = hits[0]->json_type() == ObJsonNodeType::J_INT ? (hits[0]->get_int() == 1) : (hits[0]->get_double() == 1.0);