Skip to content

fix(kv-ir): Fix compiler warnings found in y-scope/velox#29. - #1287

Merged
LinZhihao-723 merged 1 commit into
y-scope:mainfrom
LinZhihao-723:ir-fix
Sep 5, 2025
Merged

fix(kv-ir): Fix compiler warnings found in y-scope/velox#29.#1287
LinZhihao-723 merged 1 commit into
y-scope:mainfrom
LinZhihao-723:ir-fix

Conversation

@LinZhihao-723

@LinZhihao-723 LinZhihao-723 commented Sep 5, 2025

Copy link
Copy Markdown
Member

Description

The Velox build workflow has the following errors: https://github.com/y-scope/velox/actions/runs/17495530034/job/49695302630?pr=29

This PR fixes these issues.

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 the Velox workflow passed with this PR.
  • Ensure all CLP workflows pass.

Summary by CodeRabbit

  • New Features
    • No user-facing changes in this release.
  • Refactor
    • Minor internal clean-up to improve consistency without altering behaviour.
  • Style
    • Adjusted initialisation order and iteration style for clarity and lint compliance.
  • Performance
    • Small internal optimisation to reduce unnecessary copies during iteration.

@LinZhihao-723
LinZhihao-723 requested a review from a team as a code owner September 5, 2025 16:19
@coderabbitai

coderabbitai Bot commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Reorders a member initializer list in a C++ constructor and changes a range-based for-loop to iterate by const reference instead of by value. No public APIs are changed.

Changes

Cohort / File(s) Summary
Constructor initializer order
components/core/src/clp/ffi/ir_stream/Deserializer.hpp
Reordered member initializer list: m_metadata before m_ir_unit_handler; no functional change.
Loop iteration by reference
components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp
Updated range-for to use auto const& [node_id, token_it] instead of by value to avoid pair copies; logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9dde8f8 and f5922f5.

📒 Files selected for processing (2)
  • components/core/src/clp/ffi/ir_stream/Deserializer.hpp (1 hunks)
  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit configuration file

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp
  • components/core/src/clp/ffi/ir_stream/Deserializer.hpp
🧠 Learnings (1)
📚 Learning: 2025-05-07T16:56:53.901Z
Learnt from: LinZhihao-723
PR: y-scope/clp#882
File: components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.cpp:428-450
Timestamp: 2025-05-07T16:56:53.901Z
Learning: The `QueryHandlerImpl` class in clp/ffi/ir_stream/search is not designed to be thread-safe and is assumed to not be used across multiple threads.

Applied to files:

  • components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: ubuntu-jammy-static-linked-bins
  • GitHub Check: ubuntu-jammy-dynamic-linked-bins
  • GitHub Check: musllinux_1_2-x86_64-dynamic-linked-bins
  • GitHub Check: musllinux_1_2-x86_64-static-linked-bins
  • GitHub Check: centos-stream-9-static-linked-bins
  • GitHub Check: manylinux_2_28-x86_64-dynamic-linked-bins
  • GitHub Check: centos-stream-9-dynamic-linked-bins
  • GitHub Check: manylinux_2_28-x86_64-static-linked-bins
  • GitHub Check: lint-check (ubuntu-24.04)
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: build-macos (macos-15, true)
  • GitHub Check: build-macos (macos-15, false)
🔇 Additional comments (2)
components/core/src/clp/ffi/ir_stream/Deserializer.hpp (1)

196-198: Initializer order aligned with member declaration — resolves -Wreorder.

This brings the ctor’s initializer list into the same relative order as the members (m_metadata before m_ir_unit_handler), which should silence -Wreorder when treated as errors. Behaviour is unchanged.

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

468-474: Avoids copies in loop — good micro-optimisation.

Binding the structured pair by const& prevents unnecessary copies of ColumnDescriptorTokenIterator. Logic unchanged.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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 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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@LinZhihao-723 LinZhihao-723 changed the title fix(kv-ir): Fix compilation errors reported by the Velox build workflow. fix(kv-ir): Fix compiler warnings found in y-scope/velox#29. Sep 5, 2025
@anlowee
anlowee self-requested a review September 5, 2025 17:01
@LinZhihao-723
LinZhihao-723 merged commit bfd4f60 into y-scope:main Sep 5, 2025
29 checks passed
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
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