Skip to content

Commit b1cbf2e

Browse files
authored
feat(frontend): disallow backfill order with cross-db snapshot backfill (#22300)
1 parent 28e793d commit b1cbf2e

File tree

1 file changed

+11
-0
lines changed
  • src/frontend/src/stream_fragmenter

1 file changed

+11
-0
lines changed

src/frontend/src/stream_fragmenter/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ pub struct BuildFragmentGraphState {
7070

7171
has_source_backfill: bool,
7272
has_snapshot_backfill: bool,
73+
has_cross_db_snapshot_backfill: bool,
7374
}
7475

7576
impl BuildFragmentGraphState {
@@ -172,6 +173,15 @@ pub fn build_graph_with_strategy(
172173
.to_owned(),
173174
)));
174175
}
176+
if state.has_cross_db_snapshot_backfill
177+
&& let Some(ref backfill_order) = backfill_order
178+
&& !backfill_order.order.is_empty()
179+
{
180+
return Err(RwError::from(NotSupported(
181+
"Backfill order control with cross-db snapshot backfill is not supported".to_owned(),
182+
"Please remove backfill order specification from your query".to_owned(),
183+
)));
184+
}
175185

176186
let mut fragment_graph = state.fragment_graph.to_protobuf();
177187

@@ -372,6 +382,7 @@ fn build_fragment(
372382
StreamScanType::CrossDbSnapshotBackfill => {
373383
current_fragment.fragment_type_mask |=
374384
FragmentTypeFlag::CrossDbSnapshotBackfillStreamScan as u32;
385+
state.has_cross_db_snapshot_backfill = true;
375386
}
376387
StreamScanType::Unspecified
377388
| StreamScanType::Chain

0 commit comments

Comments
 (0)