docs: clarify flat input schema requirement in compaction reader

Agent-Logs-Url: https://github.com/GreptimeTeam/greptimedb/sessions/d0dc5df7-0d37-4ed0-bfb9-a796fc8025af

Co-authored-by: MichaelScofield <990479+MichaelScofield@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-20 04:46:03 +00:00
committed by GitHub
parent c72b5194f1
commit 8c90f2e800

View File

@@ -1006,6 +1006,8 @@ impl CompactionSstReaderBuilder<'_> {
/// for compaction. The schema of the [FlatSource] is unified.
async fn build_flat_sst_reader(self) -> Result<FlatSource> {
let scan_input = self.build_scan_input().await?.with_compaction(true);
// 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 stream = SeqScan::new(scan_input)