Skip to content

Commit

Permalink
HasChanges is not required to be virtual anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Tishj committed Jan 7, 2025
1 parent b157f1f commit 9cdb304
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
2 changes: 1 addition & 1 deletion src/include/duckdb/storage/table/column_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class ColumnData {
const LogicalType &RootType() const;
//! Whether or not the column has any updates
bool HasUpdates() const;
virtual bool HasChanges(idx_t start_row, idx_t end_row) const;
bool HasChanges(idx_t start_row, idx_t end_row) const;
//! Whether or not we can scan an entire vector
virtual ScanVectorType GetVectorScanType(ColumnScanState &state, idx_t scan_count, Vector &result);

Expand Down
1 change: 0 additions & 1 deletion src/include/duckdb/storage/table/standard_column_data.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class StandardColumnData : public ColumnData {
ValidityColumnData validity;

public:
bool HasChanges(idx_t start_row, idx_t end_row) const override;
void SetStart(idx_t new_start) override;

ScanVectorType GetVectorScanType(ColumnScanState &state, idx_t scan_count, Vector &result) override;
Expand Down
15 changes: 0 additions & 15 deletions src/storage/table/standard_column_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,6 @@ ScanVectorType StandardColumnData::GetVectorScanType(ColumnScanState &state, idx
return validity.GetVectorScanType(state.child_states[0], scan_count, result);
}

bool StandardColumnData::HasChanges(idx_t start_row, idx_t end_row) const {
if (ColumnData::HasChanges(start_row, end_row)) {
return true;
}
auto validity_compression = validity.GetCompressionFunction();
if (!validity_compression) {
return false;
}
if (validity_compression->type != CompressionType::COMPRESSION_EMPTY) {
// Validity data is separately compressed, this segment is not responsible for storing the validity
return false;
}
return validity.HasChanges(start_row, end_row);
}

void StandardColumnData::InitializePrefetch(PrefetchState &prefetch_state, ColumnScanState &scan_state, idx_t rows) {
ColumnData::InitializePrefetch(prefetch_state, scan_state, rows);
validity.InitializePrefetch(prefetch_state, scan_state.child_states[0], rows);
Expand Down

0 comments on commit 9cdb304

Please sign in to comment.