From 3a032fbbc6f1f100b79b9b736908b07b8a251efb Mon Sep 17 00:00:00 2001 From: discord9 Date: Mon, 16 Nov 2026 13:09:44 +0800 Subject: [PATCH] test(query): pin the native PromQL option default to off (#10371) The native route is gated by two halves: the engine-wide `experimental_native_promql` option and the per-request `query.experimental_native_promql` extension. The extension half is already covered by the `native_promql_requested_*` tests in `query::promql::planner::native`, and the plan-shape no-op is covered by `SeriesFrameOutput`'s `a_plan_without_a_frame_declaration_is_untouched`. What was not pinned is the default of the engine option itself. Flipping that `false` to `true` would expose the native route to every query that sets the extension, and no test would fail. Assert it directly so the opt-in property cannot regress silently. Signed-off-by: discord9 --- src/query/src/options.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/query/src/options.rs b/src/query/src/options.rs index f10a3c2c64b..39ef4233480 100644 --- a/src/query/src/options.rs +++ b/src/query/src/options.rs @@ -866,6 +866,19 @@ experimental_memory_pool_policy = "fair" ); } + /// The native PromQL route is opt-in: a query that states nothing keeps the plan the + /// existing planner builds. + /// + /// The per-request `query.experimental_native_promql` extension is read by + /// `query::promql::planner::native::native_promql_requested`; this default is the other + /// half of that gate today, and it becomes the only gate for a query that states nothing + /// once #10262 lands. Flipping it would expose the native route to every query that sets + /// the extension. + #[test] + fn test_native_promql_is_off_by_default() { + assert!(!QueryOptions::default().experimental_native_promql); + } + #[test] fn test_parse_invalid_spill_option_values() { for toml_str in [