Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execution: start implementing subqueries #280

Conversation

MichaHoffmann
Copy link
Contributor

@MichaHoffmann MichaHoffmann commented May 29, 2023

caveats:

  • only instant queries for now

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch 10 times, most recently from 155de0c to 7205782 Compare June 1, 2023 09:41
@MichaHoffmann MichaHoffmann changed the title WIP: implement subqueries with pushed down temporal aggregations executions: start implementing subqueries Jun 1, 2023
@MichaHoffmann MichaHoffmann changed the title executions: start implementing subqueries execution: start implementing subqueries Jun 1, 2023
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch from 7205782 to 1bbd6c2 Compare June 1, 2023 09:43
engine/engine.go Show resolved Hide resolved
execution/subquery/subquery.go Outdated Show resolved Hide resolved
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch 8 times, most recently from 7068708 to 50a8f50 Compare June 10, 2023 18:32
@MichaHoffmann
Copy link
Contributor Author

benchmark results from the one contrived query:

goos: linux
goarch: amd64
pkg: github.com/thanos-io/promql-engine/engine
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
BenchmarkInstantQuery/subquery_sum_over_time/old_engine-8         	      15	  68072512 ns/op	 3433186 B/op	   33436 allocs/op
BenchmarkInstantQuery/subquery_sum_over_time/new_engine-8         	      42	  26401382 ns/op	 4345721 B/op	   42269 allocs/op
PASS
ok  	github.com/thanos-io/promql-engine/engine	10.983s

Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a first step, let's see if anyone else has any comments or suggestions

Copy link
Collaborator

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, just one question from my side.

As a side note, I found the refactoring to query.Options a bit distracting from the main change introduced by the PR.

execution/execution.go Show resolved Hide resolved
Copy link
Collaborator

@fpetkovski fpetkovski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@fpetkovski
Copy link
Collaborator

@MichaHoffmann is this good to merge?

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch 2 times, most recently from ee69a0e to c7e52a4 Compare August 20, 2023 12:23
@MichaHoffmann
Copy link
Contributor Author

@MichaHoffmann is this good to merge?

Yeah! I rebased on latest main and it passes promql acceptance tests too !

@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch from c7e52a4 to 44eabd4 Compare August 20, 2023 14:22
Signed-off-by: Michael Hoffmann <mhoffm@posteo.de>
@MichaHoffmann MichaHoffmann force-pushed the mhoffm-pushed-down-subqueries-with-vertical-slices branch from 44eabd4 to 5ad544b Compare August 20, 2023 14:24
@fpetkovski fpetkovski merged commit e91bc49 into thanos-io:main Aug 21, 2023
6 checks passed
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's also worth adding how subqueries support works like to README 😄

@MichaHoffmann
Copy link
Contributor Author

I think it's also worth adding how subqueries support works like to README 😄

Yeah, valid remark; Ill add a small section in a new PR in a minute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants