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 <discord9@163.com>
This commit is contained in:
discord9
2026-11-16 13:09:44 +08:00
committed by GitHub
parent d0324193fe
commit 3a032fbbc6
+13
View File
@@ -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 [