Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -242,18 +242,9 @@ int ObExprOutputPack::convert_string_value_charset(common::ObObj &value,
{
int ret = OB_SUCCESS;
ObCharsetType charset_type = CHARSET_INVALID;
ObCharsetType ncharset_type = CHARSET_INVALID;
if (OB_FAIL(my_session.get_character_set_results(charset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else if (OB_FAIL(my_session.get_ncharacter_set_connection(ncharset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else {
if (lib::is_oracle_mode()
&& (value.is_nchar() || value.is_nvarchar2())
&& ncharset_type != CHARSET_INVALID
&& ncharset_type != CHARSET_BINARY) {
charset_type = ncharset_type;
}
OZ (value.convert_string_value_charset(charset_type, alloc));
}
return ret;
@ -266,7 +257,6 @@ int ObExprOutputPack::convert_lob_value_charset(common::ObObj &value,
ObString str;
ObLobLocator *lob_locator = NULL;
ObCharsetType charset_type = CHARSET_INVALID;
ObCharsetType ncharset_type = CHARSET_INVALID;
if (OB_FAIL(value.get_lob_locator(lob_locator))) {
LOG_WARN("get lob locator failed", K(ret));
} else if (OB_ISNULL(lob_locator)) {
@ -276,17 +266,6 @@ int ObExprOutputPack::convert_lob_value_charset(common::ObObj &value,
LOG_WARN("get lob locator payload failed", K(ret));
} else if (OB_FAIL(my_session.get_character_set_results(charset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else if (OB_FAIL(my_session.get_ncharacter_set_connection(ncharset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else {
if (lib::is_oracle_mode()
&& (value.is_nchar() || value.is_nvarchar2())
&& ncharset_type != CHARSET_INVALID
&& ncharset_type != CHARSET_BINARY) {
charset_type = ncharset_type;
}
}
if (OB_FAIL(ret)) {
} else if (ObCharset::is_valid_charset(charset_type) && CHARSET_BINARY != charset_type) {
ObCollationType collation_type = ObCharset::get_default_collation(charset_type);
const ObCharsetInfo *from_charset_info = ObCharset::get_charset(value.get_collation_type());
@ -331,24 +310,12 @@ int ObExprOutputPack::convert_text_value_charset(common::ObObj& value,
{
int ret = OB_SUCCESS;
ObCharsetType charset_type = CHARSET_INVALID;
ObCharsetType ncharset_type = CHARSET_INVALID;
ObString raw_str = value.get_string();
if (OB_ISNULL(raw_str.ptr()) || raw_str.length() == 0) {
// may need return error?
LOG_DEBUG("get null lob locator v2", K(ret));
} else if (OB_FAIL(my_session.get_character_set_results(charset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else if (OB_FAIL(my_session.get_ncharacter_set_connection(ncharset_type))) {
LOG_WARN("fail to get result charset", K(ret));
} else {
if (lib::is_oracle_mode()
&& (value.is_nchar() || value.is_nvarchar2())
&& ncharset_type != CHARSET_INVALID
&& ncharset_type != CHARSET_BINARY) {
charset_type = ncharset_type;
}
}
if (OB_FAIL(ret)) {
} else if (ObCharset::is_valid_charset(charset_type) && CHARSET_BINARY != charset_type) {
ObCollationType to_collation_type = ObCharset::get_default_collation(charset_type);
ObCollationType from_collation_type = value.get_collation_type();