Skip to content

Commit

Permalink
fully reinitialize stats
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Aug 26, 2024
1 parent 0af3dfc commit 0ef43f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/storage/table/row_group_collection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,8 @@ void RowGroupCollection::InitializeAppend(TransactionData transaction, TableAppe
state.start_row_group->InitializeAppend(state.row_group_append_state);
state.transaction = transaction;

// initialize thread-local stats so we have less lock contention when updating distinct statistics
state.stats = TableStatistics();
state.stats.InitializeEmpty(types);
}

Expand Down

0 comments on commit 0ef43f9

Please sign in to comment.