Adding compaction to table operations