Skip to content

feat: update some interceptor to carry more information#8090

Draft
sunng87 wants to merge 9 commits into
GreptimeTeam:mainfrom
sunng87:feat/prom-interceptor-query
Draft

feat: update some interceptor to carry more information#8090
sunng87 wants to merge 9 commits into
GreptimeTeam:mainfrom
sunng87:feat/prom-interceptor-query

Conversation

@sunng87
Copy link
Copy Markdown
Member

@sunng87 sunng87 commented May 9, 2026

I hereby agree to the terms of the GreptimeDB CLA.

Refer to a related PR or issue link (optional)

What's changed and what's your intention?

  • Will carry parse promql Expr to pre_execute
  • Carry Option<&Statement> to SqlQueryInterceptor

PR Checklist

Please convert it to a draft if some of the following conditions are not met.

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.
  • This PR requires documentation updates.
  • API changes are backward compatible.
  • Schema or data changes are backward compatible.

@github-actions github-actions Bot added size/M docs-not-required This change does not impact docs. labels May 9, 2026
@sunng87 sunng87 changed the title feat: update some interceptor to carray more information feat: update some interceptor to carry more information May 9, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors QueryContext to consolidate mutable fields—including extensions, snapshot sequences, and SST minimum sequences—into a single RwLock protected structure, thereby removing redundant Arc wrapping. The interceptor API was updated, specifically modifying pre_execute to accept optional statements and adding PromQL expression support to PromQueryInterceptor. Additionally, the changes incorporate performance optimizations by utilizing unwrap_or_else for lazy string allocations and cleaning up unnecessary string conversions and mutable variable declarations throughout the codebase. I have no feedback to provide.

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. size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant