mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-12-01 07:04:09 +00:00
fix(table): refuse a scan that plans interleaved ordering
A scan's planned ordering is a guarantee its own partitions keep. Interleaved is the transport annotation for fragments several producers contribute, so a scanner that planned it has no raw-series read whose frame would honour that declaration. Reject it in the scan conversion, while the frame codec keeps accepting interleaved raw frames from the router that reconciles them. Signed-off-by: discord9 <discord9@163.com>
This commit is contained in:
@@ -614,6 +614,14 @@ impl RegionScanExec {
|
||||
let ordering = scanner
|
||||
.raw_series_ordering()
|
||||
.map_err(|e| DataFusionError::External(Box::new(e)))?;
|
||||
// A scan's planned ordering is a guarantee its own partitions keep. Interleaved is a
|
||||
// transport annotation for fragments several producers contribute; it is not something a
|
||||
// single scanner can promise, so a scan that planned it is refused here.
|
||||
if ordering == SeriesOrdering::Interleaved {
|
||||
return Err(DataFusionError::Plan(
|
||||
"a scan cannot plan interleaved raw series ordering".into(),
|
||||
));
|
||||
}
|
||||
let arrow_schema = raw_series_frame_schema_with_ordering(&schema, &label_source, ordering)?;
|
||||
let partition_count = scanner.properties().num_partitions().max(1);
|
||||
let properties = Arc::new(PlanProperties::new(
|
||||
|
||||
Reference in New Issue
Block a user