Skip to content

Commit

Permalink
chore: no lint false positives
Browse files Browse the repository at this point in the history
Signed-off-by: pengyu <[email protected]>
  • Loading branch information
py023 committed Jan 4, 2024
1 parent 3609aa2 commit fd6e21d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion be/src/olap/rowset/segment_creator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Status SegmentFlusher::_expand_variant_to_subcolumns(vectorized::Block& block,
VLOG_DEBUG << "dump rs schema: " << _context->tablet_schema->dump_structure();
}

block.swap(flush_block);
block.swap(flush_block); // NOLINT(bugprone-use-after-move)
VLOG_DEBUG << "dump block: " << block.dump_data();
VLOG_DEBUG << "dump flush schema: " << flush_schema->dump_structure();
return Status::OK();
Expand Down
2 changes: 1 addition & 1 deletion be/src/service/backend_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void _ingest_binlog(IngestBinlogArg* arg) {
}

// Step 5.2: check data capacity
uint64_t total_size = std::accumulate(segment_file_sizes.begin(), segment_file_sizes.end(), 0);
uint64_t total_size = std::accumulate(segment_file_sizes.begin(), segment_file_sizes.end(), 0); // NOLINT(bugprone-fold-init-type)
if (!local_tablet->can_add_binlog(total_size)) {
LOG(WARNING) << "failed to add binlog, no enough space, total_size=" << total_size
<< ", tablet=" << local_tablet->tablet_id();
Expand Down
8 changes: 4 additions & 4 deletions be/src/vec/common/hash_table/hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,10 +639,10 @@ class HashTable : private boost::noncopyable,
std::swap(_need_partition, rhs._need_partition);
std::swap(_partitioned_threshold, rhs._partitioned_threshold);

Hash::operator=(std::move(rhs));
Allocator::operator=(std::move(rhs));
Cell::State::operator=(std::move(rhs));
ZeroValueStorage<Cell::need_zero_value_storage, Cell>::operator=(std::move(rhs));
Hash::operator=(std::move(rhs)); // NOLINT(bugprone-use-after-move)
Allocator::operator=(std::move(rhs)); // NOLINT(bugprone-use-after-move)
Cell::State::operator=(std::move(rhs)); // NOLINT(bugprone-use-after-move)
ZeroValueStorage<Cell::need_zero_value_storage, Cell>::operator=(std::move(rhs)); // NOLINT(bugprone-use-after-move)

return *this;
}
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exec/format/orc/vorc_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1917,7 +1917,7 @@ Status OrcReader::on_string_dicts_loaded(
auto data_type = slot_desc->get_data_type_ptr();
if (data_type->is_nullable()) {
temp_block.insert(
{ColumnNullable::create(std::move(dict_value_column),
{ColumnNullable::create(std::move(dict_value_column), // NOLINT(bugprone-use-after-move)
ColumnUInt8::create(dict_value_column_size, 0)),
std::make_shared<DataTypeNullable>(std::make_shared<DataTypeString>()),
""});
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exec/format/parquet/vparquet_group_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ Status RowGroupReader::_rewrite_dict_predicates() {
auto data_type = slot_desc->get_data_type_ptr();
if (data_type->is_nullable()) {
temp_block.insert(
{ColumnNullable::create(std::move(dict_value_column),
{ColumnNullable::create(std::move(dict_value_column), // NOLINT(bugprone-use-after-move)
ColumnUInt8::create(dict_value_column_size, 0)),
std::make_shared<DataTypeNullable>(std::make_shared<DataTypeString>()),
""});
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/exec/scan/new_olap_scan_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ Status NewOlapScanNode::_init_scanners(std::list<VScannerSPtr>* scanners) {
}

const auto max_add_seg_nums = rs_seg_count[rowset_idx] - segment_idx_to_scan;
auto& split = rs_splits.emplace_back();
auto& split = rs_splits.emplace_back(); // NOLINT(bugprone-use-after-move)
split.rs_reader = read_source.rs_splits[rowset_idx].rs_reader->clone();

// if segments assigned to current scanner are already more than the average count,
Expand Down
2 changes: 1 addition & 1 deletion be/src/vec/functions/function.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ColumnPtr wrap_in_nullable(const ColumnPtr& src, const Block& block, const Colum

if (auto* nullable = assert_cast<const ColumnNullable*>(elem.column.get())) {
const ColumnPtr& null_map_column = nullable->get_null_map_column_ptr();
if (!result_null_map_column) {
if (!result_null_map_column) { // NOLINT(bugprone-use-after-move)
result_null_map_column = null_map_column->clone_resized(input_rows_count);
} else {
if (!mutable_result_null_map_column) {
Expand Down

0 comments on commit fd6e21d

Please sign in to comment.