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:
discord9
2026-11-05 22:17:25 +08:00
parent ea187ba869
commit 8885be7d10
+8
View File
@@ -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(