Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelzqiu committed Mar 12, 2024
1 parent 4ad8141 commit 05969a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/Storages/MergeTree/IMergeTreeDataPart.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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{},
Expand Down
4 changes: 2 additions & 2 deletions src/Storages/MergeTree/MutateTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 05969a3

Please sign in to comment.