Skip to content

Conversation

@LinZhihao-723
Copy link
Member

@LinZhihao-723 LinZhihao-723 commented Apr 28, 2025

Description

References

Overview

This PR adds a template QueryHandler that defines APIs for KV-pair IR stream search query handling. This handler maintains a query and is responsible for:

  • updating partially resolved column descriptors on each concrete schema tree node from the stream.
  • evaluating the query on deserialized node-ID-value pairs.

This PR defines the APIs above without an actual implementation. The implementation will be added in the coming PRs.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • Ensure all workflows passed.

Summary by CodeRabbit

  • New Features
    • Introduced a new error handling system for IR stream search queries, including standardized error codes and messages.
    • Added a new QueryHandler class to support key-value pair IR stream search queries, with methods for schema resolution and query evaluation (currently not implemented).
  • Chores
    • Updated build configuration to include new source and header files for extended unit test coverage.

kirkrodrigues and others added 30 commits April 24, 2025 11:18
…ernal-deps task to core-all-parallel; Remove obsolete comment about submodule download parallelization.
@LinZhihao-723 LinZhihao-723 requested a review from a team as a code owner April 28, 2025 17:55
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 28, 2025

Warning

Rate limit exceeded

@LinZhihao-723 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 14 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 634fbba and 17790a8.

📒 Files selected for processing (2)
  • components/core/src/clp/ffi/ir_stream/search/ErrorCode.cpp (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/QueryHandler.hpp (1 hunks)
## Walkthrough

This change introduces new components for key-value pair IR stream search functionality within the codebase. It adds a templated `QueryHandler` class with stubbed methods for query handling, a dedicated error code enum and error category for query handler errors, and integrates these new files into the unit test build configuration. The error handling is standardized using a custom error code enum and category, and the new handler class is designed with a factory method and strict control over copy/move semantics. All new methods currently return a "not implemented" error.

## Changes

| File(s)                                                                                           | Change Summary                                                                                                                                                                                                                                                                                                                                                      |
|-------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| components/core/CMakeLists.txt                                                                   | Added `AstEvaluationResult.hpp`, `ErrorCode.cpp`, `ErrorCode.hpp`, and `QueryHandler.hpp` from the `ir_stream/search` module to the unit test source files list.                                                                                                                                                                                                 |
| components/core/src/clp/ffi/ir_stream/search/{QueryHandler.hpp, ErrorCode.hpp, ErrorCode.cpp}    | Introduced a templated `QueryHandler` class for IR stream search query handling, including a factory method, public stub methods for column resolution and evaluation, and strict copy/move semantics. Defined a new `ErrorCodeEnum` with a `MethodNotImplemented` value, a corresponding `ErrorCode` type alias, and integrated error category specialization with messages. |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant Client
    participant QueryHandlerFactory as QueryHandler::create
    participant QueryHandler

    Client->>QueryHandlerFactory: create(callback)
    QueryHandlerFactory-->>Client: QueryHandler instance or ErrorCode

    Client->>QueryHandler: step_column_resolution(...)
    QueryHandler-->>Client: ErrorCode(MethodNotImplemented)

    Client->>QueryHandler: evaluate_node_id_value_pairs(...)
    QueryHandler-->>Client: ErrorCode(MethodNotImplemented)

Suggested reviewers

  • kirkrodrigues
  • davidlion

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKNwSPbABsvkCiQBHbGlcSHFcLzpIACIAMxJqAAoAawkweAoASi4AQVp6AAMARW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99q4kj9QDwkm9sQrdn9tDqgtAn9WDYkKDJAokm9n9zdDui9S9UA8MudEE+d/ghd28BuZ0+gQAA== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=y-scope/clp&utm_content=863):

- Review comments: Directly reply to a review comment made by CodeRabbit. Example:
  - `I pushed a fix in commit <commit_id>, please review it.`
  - `Generate unit testing code for this file.`
  - `Open a follow-up GitHub issue for this discussion.`
- Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples:
  - `@coderabbitai generate unit testing code for this file.`
  -	`@coderabbitai modularize this function.`
- PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
  - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.`
  - `@coderabbitai read src/utils.ts and generate unit testing code.`
  - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.`
  - `@coderabbitai help me debug CodeRabbit configuration file.`

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

### CodeRabbit Commands (Invoked using PR comments)

- `@coderabbitai pause` to pause the reviews on a PR.
- `@coderabbitai resume` to resume the paused reviews.
- `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
- `@coderabbitai full review` to do a full review from scratch and review all the files again.
- `@coderabbitai summary` to regenerate the summary of the PR.
- `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR.
- `@coderabbitai generate sequence diagram` to generate a sequence diagram of the changes in this PR.
- `@coderabbitai resolve` resolve all the CodeRabbit review comments.
- `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository.
- `@coderabbitai help` to get help.

### Other keywords and placeholders

- Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed.
- Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description.
- Add `@coderabbitai` anywhere in the PR title to generate the title automatically.

### CodeRabbit Configuration File (`.coderabbit.yaml`)

- You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository.
- Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information.
- If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: `# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json`

### Documentation and Community

- Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

Copy link
Member Author

Choose a reason for hiding this comment

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

@kirkrodrigues Can u help review;

  • The docstring of this class.
  • The docstring and naming of the two APIs:
    • step_column_resolution
    • evaluate_node_id_value_pairs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
components/core/src/clp/ffi/ir_stream/search/QueryHandler.hpp (4)

13-24: Fix minor grammar issue in class documentation.

There's a small grammatical error in the class documentation.

-/**
- * Class for handle KV-pair IR stream search queries.
+/**
+ * Class for handling KV-pair IR stream search queries.

27-35: TODO item in documentation needs to be completed.

The factory method documentation has a placeholder for possible error codes that needs to be completed.

When implementing the method, please update the documentation to list the specific error codes that could be returned.


48-60: TODO item in documentation needs to be completed.

The method documentation has a placeholder for possible error codes that needs to be completed.

When implementing the method, please update the documentation to list the specific error codes that could be returned.


62-73: TODO item in documentation needs to be completed.

The method documentation has a placeholder for possible error codes that needs to be completed.

When implementing the method, please update the documentation to list the specific error codes that could be returned.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee35748 and f9ee740.

📒 Files selected for processing (5)
  • components/core/CMakeLists.txt (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/AstEvaluationResult.hpp (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/QueryHandler.hpp (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.cpp (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.hpp (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.

**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}: - Prefer false == <expression> rather than !<expression>.

  • components/core/src/clp/ffi/ir_stream/search/AstEvaluationResult.hpp
  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.hpp
  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.cpp
  • components/core/src/clp/ffi/ir_stream/search/QueryHandler.hpp
⏰ Context from checks skipped due to timeout of 90000ms (10)
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-lint
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: build-macos (macos-14, false)
  • GitHub Check: build-macos (macos-13, false)
  • GitHub Check: build-macos (macos-14, true)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-15, false)
🔇 Additional comments (7)
components/core/CMakeLists.txt (1)

476-480: LGTM. Build configuration correctly includes new search-related components.

The CMakeLists.txt has been properly updated to include all the new files related to the KV-pair IR stream query handling functionality in the unit test target.

components/core/src/clp/ffi/ir_stream/search/AstEvaluationResult.hpp (1)

1-23: LGTM. Well-structured enum implementation with clear documentation.

The enum class is well-designed with an appropriate fixed size (uint8_t) and has clear documentation describing the purpose of each evaluation result. The enum values (True, False, Pruned) cover the necessary evaluation states for the search AST.

components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.cpp (1)

1-21: LGTM. Error category implementation is straightforward and effective.

The error category specialization for QueryHandlerErrorCodeEnum correctly provides a descriptive name and appropriate error messages for the defined error codes. The default case ensures future error codes will be handled gracefully.

components/core/src/clp/ffi/ir_stream/search/QueryHandlerErrorCode.hpp (1)

1-23: LGTM. Error code definition is simple and properly integrated with error handling system.

The error code enum is appropriately defined with a fixed size and properly marked for integration with the error handling framework. The code is well-structured with clear documentation.

components/core/src/clp/ffi/ir_stream/search/QueryHandler.hpp (3)

85-91: LGTM. Placeholder implementation correctly returns unimplemented error code.

The factory method is properly implemented to return a MethodNotImplemented error code, which is appropriate for this initial API definition PR.


93-100: LGTM. Placeholder implementation correctly returns unimplemented error code.

The step_column_resolution method is properly implemented to return a MethodNotImplemented error code, which is appropriate for this initial API definition PR.


102-108: LGTM. Placeholder implementation correctly returns unimplemented error code.

The evaluate_node_id_value_pairs method is properly implemented to return a MethodNotImplemented error code, which is appropriate for this initial API definition PR.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

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

For the PR title, how about:

feat(kv-ir): Add `QueryHandler` API declarations for handling KV-pair IR stream queries.

Also, don't forget to reference the feature request.

@LinZhihao-723 LinZhihao-723 changed the title feat(kv-ir): Add QueryHandler template to define APIs for KV-pair IR stream query handling. feat(kv-ir): Add QueryHandler API declarations for handling KV-pair IR stream queries. Apr 28, 2025
@LinZhihao-723 LinZhihao-723 merged commit 175e8d9 into y-scope:main Apr 29, 2025
23 of 25 checks passed
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.

2 participants