query(compact): fix tests
@@ -42,10 +42,14 @@ impl Compactor for SortMergeCompactor {
}
fn compact_final(&self, blocks: &[DataBlock]) -> Result<Vec<DataBlock>> {
+ if blocks.is_empty() {
+ Ok(vec![])
+ } else {
let block =
DataBlock::merge_sort_blocks(blocks, &self.sort_columns_descriptions, self.limit)?;
Ok(vec![block])
}
}
+}
pub type TransformSortMerge = TransformCompact<SortMergeCompactor>;
