From b7c08b9d2a50578aa4f80e3ca372a9a060ddf9f2 Mon Sep 17 00:00:00 2001 From: Harry John Date: Thu, 2 Jan 2025 10:57:42 -0800 Subject: [PATCH] Enable analysis on Thanos PromQL engine (#6472) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 🌲 Harry 🌊 John 🏔 --- pkg/cortex/modules.go | 1 + pkg/querier/querier.go | 1 + 2 files changed, 2 insertions(+) diff --git a/pkg/cortex/modules.go b/pkg/cortex/modules.go index 5b8a3640b0..bb85b3d8d1 100644 --- a/pkg/cortex/modules.go +++ b/pkg/cortex/modules.go @@ -607,6 +607,7 @@ func (t *Cortex) initRuler() (serv services.Service, err error) { queryEngine = engine.New(engine.Opts{ EngineOpts: opts, LogicalOptimizers: logicalplan.AllOptimizers, + EnableAnalysis: true, }) } else { queryEngine = promql.NewEngine(opts) diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index e9a80374cd..8927cd13f4 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -225,6 +225,7 @@ func New(cfg Config, limits *validation.Overrides, distributor Distributor, stor queryEngine = engine.New(engine.Opts{ EngineOpts: opts, LogicalOptimizers: logicalplan.AllOptimizers, + EnableAnalysis: true, }) } else { queryEngine = promql.NewEngine(opts)