[Fix](Status) Make Status [[nodiscard]] and handle returned Status correctly (#23395)
This commit is contained in:
@ -496,8 +496,9 @@ struct Trim1Impl {
|
||||
auto col_res = ColumnString::create();
|
||||
char blank[] = " ";
|
||||
StringRef rhs(blank, 1);
|
||||
TrimUtil<is_ltrim, is_rtrim>::vector(col->get_chars(), col->get_offsets(), rhs,
|
||||
col_res->get_chars(), col_res->get_offsets());
|
||||
static_cast<void>(TrimUtil<is_ltrim, is_rtrim>::vector(
|
||||
col->get_chars(), col->get_offsets(), rhs, col_res->get_chars(),
|
||||
col_res->get_offsets()));
|
||||
block.replace_by_position(result, std::move(col_res));
|
||||
} else {
|
||||
return Status::RuntimeError("Illegal column {} of argument of function {}",
|
||||
@ -529,8 +530,9 @@ struct Trim2Impl {
|
||||
const char* raw_rhs = reinterpret_cast<const char*>(&(col_right->get_chars()[0]));
|
||||
ColumnString::Offset rhs_size = col_right->get_offsets()[0];
|
||||
StringRef rhs(raw_rhs, rhs_size);
|
||||
TrimUtil<is_ltrim, is_rtrim>::vector(col->get_chars(), col->get_offsets(), rhs,
|
||||
col_res->get_chars(), col_res->get_offsets());
|
||||
static_cast<void>(TrimUtil<is_ltrim, is_rtrim>::vector(
|
||||
col->get_chars(), col->get_offsets(), rhs, col_res->get_chars(),
|
||||
col_res->get_offsets()));
|
||||
block.replace_by_position(result, std::move(col_res));
|
||||
} else {
|
||||
return Status::RuntimeError("Illegal column {} of argument of function {}",
|
||||
|
||||
Reference in New Issue
Block a user