Skip to content

refactor: introduce the ProjectInput structure#7908

Draft
fengys1996 wants to merge 2 commits intoGreptimeTeam:mainfrom
fengys1996:refactor/projection-input
Draft

refactor: introduce the ProjectInput structure#7908
fengys1996 wants to merge 2 commits intoGreptimeTeam:mainfrom
fengys1996:refactor/projection-input

Conversation

@fengys1996
Copy link
Copy Markdown
Contributor

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?

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/S docs-not-required This change does not impact docs. labels Apr 2, 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 ScanRequest by replacing the projection field with a ProjectionInput struct, enabling support for nested field access in complex columns. The changes are propagated through the system schema, metric engine, and mito2 engine. A review comment suggests removing a commented-out import in the metric engine to improve code quality.

@fengys1996
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2bc487592

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

write!(f, "ScanRequest {{ ")?;
if let Some(projection) = &self.projection {
if let Some(projection) = &self.projection_input {
write!(f, "{}projection: {:?}", delimiter.as_str(), projection)?;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve ScanRequest projection display format

ScanRequest now formats projection_input with {:?}, so logs/output become projection: ProjectionInput { projection: [...], nested_paths: [...] } instead of the previous projection: [...] form. This changes a user-visible/debuggable interface and breaks existing expectations (including the tests in this module), so tooling or assertions that parse/compare ScanRequest strings will regress even when only top-level projection indices are used.

Useful? React with 👍 / 👎.

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/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant