mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-27 10:20:38 +00:00
fix: preserve flat compaction schema and add overlapping json2 compaction case
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:
committed by
GitHub
parent
9e4778a368
commit
5e5611496a
@@ -1006,14 +1006,12 @@ 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);
|
||||
|
||||
let schema = scan_input.mapper.output_schema();
|
||||
let schema = schema.arrow_schema();
|
||||
let schema = scan_input.mapper.input_arrow_schema(true);
|
||||
|
||||
let stream = SeqScan::new(scan_input)
|
||||
.build_flat_reader_for_compaction()
|
||||
.await?;
|
||||
Ok(FlatSource::new_stream(schema.clone(), stream))
|
||||
Ok(FlatSource::new_stream(schema, stream))
|
||||
}
|
||||
|
||||
async fn build_scan_input(self) -> Result<ScanInput> {
|
||||
@@ -1096,7 +1094,15 @@ impl CompactionSstReaderBuilder<'_> {
|
||||
.map(|x| x.0.parquet_metadata())
|
||||
{
|
||||
Ok(x) => x,
|
||||
Err(e) if e.is_object_not_found() => continue,
|
||||
Err(e) if e.is_object_not_found() => {
|
||||
warn!(
|
||||
e;
|
||||
"Input SST file does not exist during compaction metadata pre-read, skip it, region_id: {}, file: {}",
|
||||
file_handle.region_id(),
|
||||
file_handle.file_id()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
};
|
||||
let file_metadata = parquet_metadata.file_metadata();
|
||||
|
||||
Reference in New Issue
Block a user