[refactor] Refactoring Status static methods to format message using fmt(#9533)
This commit is contained in:
@ -137,10 +137,8 @@ Status MysqlScanNode::write_text_slot(char* value, int value_length, SlotDescrip
|
||||
RuntimeState* state) {
|
||||
if (!_text_converter->write_slot(slot, _tuple, value, value_length, true, false,
|
||||
_tuple_pool.get())) {
|
||||
std::stringstream ss;
|
||||
ss << "Fail to convert mysql value:'" << value << "' to " << slot->type() << " on column:`"
|
||||
<< slot->col_name() + "`";
|
||||
return Status::InternalError(ss.str());
|
||||
return Status::InternalError("Fail to convert mysql value:'{}' to {} on column:`{}`", value,
|
||||
slot->type(), slot->col_name());
|
||||
}
|
||||
|
||||
return Status::OK();
|
||||
@ -212,10 +210,9 @@ Status MysqlScanNode::get_next(RuntimeState* state, RowBatch* row_batch, bool* e
|
||||
if (slot_desc->is_nullable()) {
|
||||
_tuple->set_null(slot_desc->null_indicator_offset());
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "nonnull column contains nullptr. table=" << _table_name
|
||||
<< ", column=" << slot_desc->col_name();
|
||||
return Status::InternalError(ss.str());
|
||||
return Status::InternalError(
|
||||
"nonnull column contains nullptr. table={}, column={}", _table_name,
|
||||
slot_desc->col_name());
|
||||
}
|
||||
} else {
|
||||
RETURN_IF_ERROR(write_text_slot(data[j], length[j], slot_desc, state));
|
||||
|
||||
Reference in New Issue
Block a user