mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
partially revert #54706 (135df6870c
)
This commit is contained in:
parent
01d042c490
commit
d7a6148828
@ -28,6 +28,7 @@ ReplacingSortedAlgorithm::ReplacingSortedAlgorithm(
|
|||||||
, cleanup(cleanup_)
|
, cleanup(cleanup_)
|
||||||
, cleanedup_rows_count(cleanedup_rows_count_)
|
, cleanedup_rows_count(cleanedup_rows_count_)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!is_deleted_column.empty())
|
if (!is_deleted_column.empty())
|
||||||
is_deleted_column_number = header_.getPositionByName(is_deleted_column);
|
is_deleted_column_number = header_.getPositionByName(is_deleted_column);
|
||||||
if (!version_column.empty())
|
if (!version_column.empty())
|
||||||
@ -82,11 +83,8 @@ IMergingAlgorithm::Status ReplacingSortedAlgorithm::merge()
|
|||||||
uint8_t value = assert_cast<const ColumnUInt8 &>(*(*selected_row.all_columns)[is_deleted_column_number]).getData()[selected_row.row_num];
|
uint8_t value = assert_cast<const ColumnUInt8 &>(*(*selected_row.all_columns)[is_deleted_column_number]).getData()[selected_row.row_num];
|
||||||
if (!cleanup || !value)
|
if (!cleanup || !value)
|
||||||
insertRow();
|
insertRow();
|
||||||
else if (cleanup && cleanedup_rows_count != nullptr)
|
else if (cleanedup_rows_count != nullptr)
|
||||||
{
|
|
||||||
*cleanedup_rows_count += current_row_sources.size();
|
*cleanedup_rows_count += current_row_sources.size();
|
||||||
current_row_sources.resize(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
insertRow();
|
insertRow();
|
||||||
@ -143,11 +141,8 @@ IMergingAlgorithm::Status ReplacingSortedAlgorithm::merge()
|
|||||||
uint8_t value = assert_cast<const ColumnUInt8 &>(*(*selected_row.all_columns)[is_deleted_column_number]).getData()[selected_row.row_num];
|
uint8_t value = assert_cast<const ColumnUInt8 &>(*(*selected_row.all_columns)[is_deleted_column_number]).getData()[selected_row.row_num];
|
||||||
if (!cleanup || !value)
|
if (!cleanup || !value)
|
||||||
insertRow();
|
insertRow();
|
||||||
else if (cleanup && cleanedup_rows_count != nullptr)
|
else if (cleanedup_rows_count != nullptr)
|
||||||
{
|
|
||||||
*cleanedup_rows_count += current_row_sources.size();
|
*cleanedup_rows_count += current_row_sources.size();
|
||||||
current_row_sources.resize(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
insertRow();
|
insertRow();
|
||||||
|
Loading…
Reference in New Issue
Block a user