resolve conflicts

This commit is contained in:
Zhuo Qiu 2024-03-12 14:45:25 +08:00
parent 4ad8141a16
commit 05969a39f3
2 changed files with 5 additions and 4 deletions

View File

@ -1342,7 +1342,7 @@ UInt64 IMergeTreeDataPart::readExistingRowsCount()
return rows_count;
NamesAndTypesList cols;
cols.push_back(LightweightDeleteDescription::FILTER_COLUMN);
cols.emplace_back(RowExistsColumn::name, RowExistsColumn::type);
StorageMetadataPtr metadata_ptr = storage.getInMemoryMetadataPtr();
StorageSnapshotPtr storage_snapshot_ptr = std::make_shared<StorageSnapshot>(storage, metadata_ptr);
@ -1351,7 +1351,8 @@ UInt64 IMergeTreeDataPart::readExistingRowsCount()
cols,
storage_snapshot_ptr,
MarkRanges{MarkRange(0, total_mark)},
nullptr,
/*virtual_fields=*/ {},
/*uncompressed_cache=*/{},
storage.getContext()->getMarkCache().get(),
std::make_shared<AlterConversions>(),
MergeTreeReaderSettings{},

View File

@ -62,7 +62,7 @@ static bool checkOperationIsNotCanceled(ActionBlocker & merges_blocker, MergeLis
static UInt64 getExistingRowsCount(const Block & block)
{
auto column = block.getByName(LightweightDeleteDescription::FILTER_COLUMN.name).column;
auto column = block.getByName(RowExistsColumn::name).column;
const ColumnUInt8 * row_exists_col = typeid_cast<const ColumnUInt8 *>(column.get());
if (!row_exists_col)
@ -2225,7 +2225,7 @@ bool MutateTask::prepare()
if (ctx->mutating_pipeline_builder.initialized())
ctx->execute_ttl_type = MutationHelpers::shouldExecuteTTL(ctx->metadata_snapshot, ctx->interpreter->getColumnDependencies());
if (ctx->updated_header.has(LightweightDeleteDescription::FILTER_COLUMN.name))
if (ctx->updated_header.has(RowExistsColumn::name))
{
/// This mutation contains lightweight delete, reset existing_rows_count of new data part to 0
/// It will be updated while writing _row_exists column