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)