From 6d2ec3411fc281f4060e81a82d2479a0572db532 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 04:46:35 +0000 Subject: [PATCH] refactor: make compaction schema flag explicit in flat reader setup Agent-Logs-Url: https://github.com/GreptimeTeam/greptimedb/sessions/d0dc5df7-0d37-4ed0-bfb9-a796fc8025af Co-authored-by: MichaelScofield <990479+MichaelScofield@users.noreply.github.com> --- src/mito2/src/compaction.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mito2/src/compaction.rs b/src/mito2/src/compaction.rs index 7d4302cb74..f284c732ff 100644 --- a/src/mito2/src/compaction.rs +++ b/src/mito2/src/compaction.rs @@ -1005,10 +1005,11 @@ impl CompactionSstReaderBuilder<'_> { /// Build a [FlatSource] that yields Arrow `RecordBatch`s from reading all the input SST files, /// for compaction. The schema of the [FlatSource] is unified. async fn build_flat_sst_reader(self) -> Result { - let scan_input = self.build_scan_input().await?.with_compaction(true); + let compaction = true; + let scan_input = self.build_scan_input().await?.with_compaction(compaction); // Compaction reads/writes flat SST batches (with internal columns), so this must use // the flat input schema instead of the logical output schema. - let schema = scan_input.mapper.input_arrow_schema(scan_input.compaction); + let schema = scan_input.mapper.input_arrow_schema(compaction); let stream = SeqScan::new(scan_input) .build_flat_reader_for_compaction()