HappenLee commented on code in PR #27817:
URL: https://github.com/apache/doris/pull/27817#discussion_r1411739156
##########
be/src/vec/sink/vrow_distribution.cpp:
##########
@@ -29,28 +30,31 @@
#include "vec/columns/column_const.h"
#include "vec/columns/column_nullable.h"
#include "vec/columns/column_vector.h"
+#include "vec/data_types/data_type.h"
#include "vec/sink/writer/vtablet_writer.h"
namespace doris::vectorized {
-std::pair<vectorized::VExprContextSPtr, vectorized::VExprSPtr>
+std::pair<vectorized::VExprContextSPtrs, vectorized::VExprSPtrs>
VRowDistribution::_get_partition_function() {
return {_vpartition->get_part_func_ctx(),
_vpartition->get_partition_function()};
}
-Status VRowDistribution::_save_missing_values(vectorized::ColumnPtr col,
- vectorized::DataTypePtr
value_type, Block* block,
+Status VRowDistribution::_save_missing_values(const
std::vector<std::vector<std::string>>& col_strs,
+ int col_size, Block* block,
std::vector<int64_t> filter) {
// de-duplication for new partitions but save all rows.
_batching_block->add_rows(block, filter);
- for (auto row : filter) {
- auto val_str = value_type->to_string(*col, row);
- if (!_deduper.contains(val_str)) {
- _deduper.emplace(val_str);
+ std::vector<TStringLiteral> cur_row_values;
+ for (int row = 0; row < col_strs[0].size(); ++row) {
+ cur_row_values.clear();
+ for (int col = 0; col < col_size; ++col) {
TStringLiteral node;
- node.value = std::move(val_str);
- _partitions_need_create.emplace_back(std::vector {node}); // only
1 partition column now
+ node.value = col_strs[col][row];
Review Comment:
why not use `std::move` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]