Skip to content

feat(promql): parameterize lookback#3630

Merged
tisonkun merged 13 commits intoGreptimeTeam:mainfrom
etolbakov:feat-promql-parameterize-lookback
Apr 15, 2024
Merged

feat(promql): parameterize lookback#3630
tisonkun merged 13 commits intoGreptimeTeam:mainfrom
etolbakov:feat-promql-parameterize-lookback

Conversation

@etolbakov
Copy link
Copy Markdown
Collaborator

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

#3453

What's changed and what's your intention?

Parameterize lookback and allow it to propagate from TQL

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR does not require documentation updates.

@github-actions github-actions Bot added the docs-not-required This change does not impact docs. label Apr 2, 2024
Comment thread src/servers/src/grpc/prom_query_gateway.rs Outdated
Copy link
Copy Markdown
Collaborator

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Seems we need some integration tests.

Does this patch still need some changes on the parser side?

@etolbakov
Copy link
Copy Markdown
Collaborator Author

I think it's more or less ready.
Good point about an intergration test (I was planning to add sqlness as well).
Hopefully will push it in the end of this week

@etolbakov etolbakov marked this pull request as ready for review April 10, 2024 14:41
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 10, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 85.04%. Comparing base (8779524) to head (934bbcf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3630      +/-   ##
==========================================
- Coverage   85.38%   85.04%   -0.34%     
==========================================
  Files         963      963              
  Lines      160719   160730      +11     
==========================================
- Hits       137231   136700     -531     
- Misses      23488    24030     +542     

@etolbakov
Copy link
Copy Markdown
Collaborator Author

@waynexia @tisonkun
Could you please take a look when you have time?

@etolbakov etolbakov requested review from a team and evenyag as code owners April 11, 2024 07:53
Comment thread src/frontend/src/instance/grpc.rs Outdated
Comment thread src/servers/src/http/handler.rs Outdated
Comment thread src/servers/src/http/prometheus.rs
Comment thread tests/cases/standalone/common/tql-explain-analyze/analyze.result
Copy link
Copy Markdown
Collaborator

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

Generally looks good. Suggest we convey to the HTTP endpoints so we don't leave more TODOs.

Comment thread src/servers/src/http/prometheus.rs
Copy link
Copy Markdown
Collaborator

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

LGTM.

Further update gRPC codepath and lift step param in HTTP param can be follow-ups.

Comment thread tests/cases/standalone/common/tql/basic.result
@etolbakov
Copy link
Copy Markdown
Collaborator Author

etolbakov commented Apr 12, 2024

Generally looks good. Suggest we convey to the HTTP endpoints so we don't leave more TODOs.

@tisonkun Thank you for the general feedback! I reflected on that and I'd like to spend a bit more time and deliver something useful rather then a half-baked solution.

As for grpc change I'll try making adjustment in greptime-proto repo

@tisonkun
Copy link
Copy Markdown
Collaborator

@etolbakov Cool! You can ping me as a reviewer when you submit a patch there.

Comment thread Cargo.toml Outdated
Comment thread src/client/src/database.rs Outdated
@tisonkun
Copy link
Copy Markdown
Collaborator

error: the lock file /home/runner/work/greptimedb/greptimedb/Cargo.lock needs to be updated but --locked was passed to prevent this
If you want to try to generate the lock file without accessing the network, remove the --locked flag and use --offline instead.

@etolbakov you may update the lock file locally. This should be automatically updated if you're using VSCode or RustRover. Or you can run cargo build without --locked.

@tisonkun
Copy link
Copy Markdown
Collaborator

Will this patch close #3453?

Copy link
Copy Markdown
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

This is very neat, thanks @etolbakov 🚀

Let's merge this after CI passes.

Comment thread src/servers/src/http/prometheus.rs
@tisonkun tisonkun added this pull request to the merge queue Apr 15, 2024
Merged via the queue into GreptimeTeam:main with commit bbea651 Apr 15, 2024
Comment thread src/operator/src/statement/tql.rs
@etolbakov etolbakov deleted the feat-promql-parameterize-lookback branch April 19, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required This change does not impact docs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants