Skip to content

Commit

Permalink
deal with the case where only the validity changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishj committed Jan 7, 2025
1 parent 3848664 commit 4de030f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class ColumnDataCheckpointer {
void WritePersistentSegments(ColumnCheckpointState &state);
void InitAnalyze();
void DropSegments();
bool ValidityCoveredByBasedata(vector<CheckpointAnalyzeResult> &result);

private:
vector<reference<ColumnCheckpointState>> &checkpoint_states;
Expand Down
6 changes: 5 additions & 1 deletion src/storage/table/column_data_checkpointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,14 @@ void ColumnDataCheckpointer::DropSegments() {
}
}

static bool ValidityCoveredByBasedata(vector<CheckpointAnalyzeResult> &result) {
bool ColumnDataCheckpointer::ValidityCoveredByBasedata(vector<CheckpointAnalyzeResult> &result) {
if (result.size() != 2) {
return false;
}
if (!has_changes[0]) {
// The base data had no changes so it will not be rewritten
return false;
}
auto &base = result[0];
D_ASSERT(base.function);
return base.function->validity == CompressionValidity::NO_VALIDITY_REQUIRED;
Expand Down

0 comments on commit 4de030f

Please sign in to comment.