This commit is contained in:
Alexander Tokmakov 2023-01-24 15:29:19 +01:00
parent 6ecae8388e
commit 31e16c4b4d
2 changed files with 7 additions and 5 deletions

View File

@ -243,7 +243,6 @@ ColumnFloat64::MutablePtr CatBoostLibraryHandler::evalImpl(
const ColumnRawPtrs & columns, const ColumnRawPtrs & columns,
bool cat_features_are_strings) const bool cat_features_are_strings) const
{ {
std::string error_msg = "Error occurred while applying CatBoost model: ";
size_t column_size = columns.front()->size(); size_t column_size = columns.front()->size();
auto result = ColumnFloat64::create(column_size * tree_count); auto result = ColumnFloat64::create(column_size * tree_count);
@ -265,7 +264,8 @@ ColumnFloat64::MutablePtr CatBoostLibraryHandler::evalImpl(
result_buf, column_size * tree_count)) result_buf, column_size * tree_count))
{ {
throw Exception(error_msg + api.GetErrorString(), ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL); throw Exception(ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL,
"Error occurred while applying CatBoost model: {}", api.GetErrorString());
} }
return result; return result;
} }
@ -288,7 +288,8 @@ ColumnFloat64::MutablePtr CatBoostLibraryHandler::evalImpl(
cat_features_buf, cat_features_count, cat_features_buf, cat_features_count,
result_buf, column_size * tree_count)) result_buf, column_size * tree_count))
{ {
throw Exception(error_msg + api.GetErrorString(), ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL); throw Exception(ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL,
"Error occurred while applying CatBoost model: {}", api.GetErrorString());
} }
} }
else else
@ -304,7 +305,8 @@ ColumnFloat64::MutablePtr CatBoostLibraryHandler::evalImpl(
cat_features_buf, cat_features_count, cat_features_buf, cat_features_count,
result_buf, column_size * tree_count)) result_buf, column_size * tree_count))
{ {
throw Exception(error_msg + api.GetErrorString(), ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL); throw Exception(ErrorCodes::CANNOT_APPLY_CATBOOST_MODEL,
"Error occurred while applying CatBoost model: {}", api.GetErrorString());
} }
} }

View File

@ -707,7 +707,7 @@ Block HashJoin::prepareRightBlock(const Block & block) const
bool HashJoin::addJoinedBlock(const Block & source_block, bool check_limits) bool HashJoin::addJoinedBlock(const Block & source_block, bool check_limits)
{ {
if (!data) if (!data)
throw Exception("Join data was released", ErrorCodes::LOGICAL_ERROR); throw Exception(ErrorCodes::LOGICAL_ERROR, "Join data was released");
/// RowRef::SizeT is uint32_t (not size_t) for hash table Cell memory efficiency. /// RowRef::SizeT is uint32_t (not size_t) for hash table Cell memory efficiency.
/// It's possible to split bigger blocks and insert them by parts here. But it would be a dead code. /// It's possible to split bigger blocks and insert them by parts here. But it would be a dead code.