Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.

Commit f6ad797

Browse files
committed
Address review feedback
1 parent 098a214 commit f6ad797

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/pgmodel/querier/query_builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func canAttemptPushdown(metadata *promqlMetadata) bool {
260260

261261
// We can't handle offsets in pushdowns
262262
vs, isVectorSelector := queryHints.CurrentNode.(*parser.VectorSelector)
263-
if isVectorSelector && (vs.Offset != 0 || vs.OriginalOffset != 0) {
263+
if isVectorSelector && vs.Offset != 0 {
264264
return false
265265
}
266266

pkg/tests/end_to_end_tests/promql_query_endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2507,7 +2507,7 @@ func TestPromQLQueryEndpoint(t *testing.T) {
25072507
query: `sum(rate(metric_2{foo = "bar"}[5m]))/sum(rate(metric_2[5m]))`,
25082508
},
25092509
{
2510-
name: "pushdown with offset",
2510+
name: "delta function over range selector with offset",
25112511
query: `delta(metric_2[1m] offset 3m)`,
25122512
},
25132513
}

0 commit comments

Comments
 (0)