Skip to content

Conversation

Alex-PLACET
Copy link
Collaborator

No description provided.

@Alex-PLACET Alex-PLACET requested a review from Copilot September 22, 2025 13:21
@Alex-PLACET Alex-PLACET self-assigned this Sep 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds offset support to the dynamic_bitset infrastructure to handle array slicing correctly. The changes enable bitset operations to work with a logical offset into the underlying buffer without needing to adjust the buffer pointer.

  • Added offset parameter to dynamic_bitset constructors and propagated through the class hierarchy
  • Modified bit access operations to account for the offset when indexing into the buffer
  • Updated the arrow array schema proxy to use the new offset-aware constructor

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
arrow_array_schema_proxy.cpp Updated to pass offset parameter when creating dynamic_bitset_view
dynamic_bitset_view.hpp Added offset parameter to constructors and forwarded to base class
dynamic_bitset_base.hpp Implemented offset storage and applied offset to bit access operations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Alex-PLACET Alex-PLACET requested a review from Copilot September 22, 2025 14:24
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 20 out of 20 changed files in this pull request and generated 3 comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

*
* @return The number of bits offset from the start of the buffer.
*/
[[nodiscard]] size_t offset() const noexcept;
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

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

The offset() method declaration is missing implementation. Add the implementation for this method to return m_offset.

Suggested change
[[nodiscard]] size_t offset() const noexcept;
[[nodiscard]] size_t offset() const noexcept
{
return m_offset;
}

Copilot uses AI. Check for mistakes.

}
size_type old_block_count = buffer().size();
const size_type new_block_count = compute_block_count(n);
const size_type new_block_count = compute_block_count(n + m_offset);
Copy link

Copilot AI Sep 22, 2025

Choose a reason for hiding this comment

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

Adding offset to the size for block count calculation is incorrect. The block count should be based on the actual storage needed for the bits, not the logical size plus offset. This could cause buffer overruns when the offset pushes beyond allocated memory.

Suggested change
const size_type new_block_count = compute_block_count(n + m_offset);
const size_type new_block_count = compute_block_count(n);

Copilot uses AI. Check for mistakes.

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.

1 participant