fix white filter pushdown judgement
This commit is contained in:
@ -169,11 +169,12 @@ int ObPushdownFilterConstructor::is_white_mode(const ObRawExpr* raw_expr, bool &
|
|||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_WARN("Unexpected null child expr", K(ret), K(i));
|
LOG_WARN("Unexpected null child expr", K(ret), K(i));
|
||||||
} else {
|
} else {
|
||||||
|
const ObObjMeta ¶m_meta = child->get_result_meta();
|
||||||
need_check = child->is_const_expr();
|
need_check = child->is_const_expr();
|
||||||
if (need_check) {
|
if (need_check && !param_meta.is_null()) {
|
||||||
const ObObjMeta ¶m_meta = child->get_result_meta();
|
const ObCmpOp cmp_op = sql::ObRelationalExprOperator::get_cmp_op(raw_expr->get_expr_type());
|
||||||
need_check = param_meta.is_null() ||
|
obj_cmp_func cmp_func = nullptr;
|
||||||
(col_meta.get_type() == param_meta.get_type() && col_meta.get_collation_type() == param_meta.get_collation_type());
|
need_check = ObObjCmpFuncs::can_cmp_without_cast(col_meta, param_meta, cmp_op, cmp_func);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1218,10 +1218,6 @@ public:
|
|||||||
|
|
||||||
static int eval_pl_udt_compare(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
|
static int eval_pl_udt_compare(const ObExpr &expr, ObEvalCtx &ctx, ObDatum &expr_datum);
|
||||||
|
|
||||||
protected:
|
|
||||||
static bool is_int_cmp_const_str(const ObExprResType *type1,
|
|
||||||
const ObExprResType *type2,
|
|
||||||
common::ObObjType &cmp_type);
|
|
||||||
OB_INLINE static common::ObCmpOp get_cmp_op(const ObExprOperatorType type) {
|
OB_INLINE static common::ObCmpOp get_cmp_op(const ObExprOperatorType type) {
|
||||||
/*
|
/*
|
||||||
* maybe we can use associative array(table lookup) to get a better
|
* maybe we can use associative array(table lookup) to get a better
|
||||||
@ -1278,6 +1274,10 @@ protected:
|
|||||||
return cmp_op;
|
return cmp_op;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
static bool is_int_cmp_const_str(const ObExprResType *type1,
|
||||||
|
const ObExprResType *type2,
|
||||||
|
common::ObObjType &cmp_type);
|
||||||
OB_INLINE static bool is_expected_cmp_ret(const common::ObCmpOp cmp_op,
|
OB_INLINE static bool is_expected_cmp_ret(const common::ObCmpOp cmp_op,
|
||||||
const int cmp_ret)
|
const int cmp_ret)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user