diff --git a/core/translate/compound_select.rs b/core/translate/compound_select.rs index 40051485d..56389d39f 100644 --- a/core/translate/compound_select.rs +++ b/core/translate/compound_select.rs @@ -154,8 +154,12 @@ fn emit_compound_select( (cursor_id, index.clone()) } _ => { - new_dedupe_index = true; - create_union_dedupe_index(program, &right_most) + if cfg!(not(feature = "index_experimental")) { + crate::bail_parse_error!("UNION not supported without indexes"); + } else { + new_dedupe_index = true; + create_union_dedupe_index(program, &right_most) + } } }; plan.query_destination = QueryDestination::EphemeralIndex {