Skip to content

Conversation

@joka921
Copy link
Member

@joka921 joka921 commented Oct 21, 2025

Extend EncodedIriManager to support a new bit pattern encoding mode alongside the existing plain digit encoding. This allows efficient encoding of IRIs with numeric values where certain bits are always zero.

Key changes:

  • Add PrefixConfig struct to store prefix with optional bit range
  • Implement encodeBitPattern/decodeBitPattern for compressed encoding
  • Update JSON serialization with backward-compatible format
  • Add comprehensive unit tests for new functionality

The new mode compresses values by removing bits in a specified range that must be zero, allowing more efficient storage while maintaining decodability.

🤖 Generated with Claude Code

joka921 and others added 5 commits October 21, 2025 14:09
Extend EncodedIriManager to support a new bit pattern encoding mode
alongside the existing plain digit encoding. This allows efficient
encoding of IRIs with numeric values where certain bits are always zero.

Key changes:
- Add PrefixConfig struct to store prefix with optional bit range
- Implement encodeBitPattern/decodeBitPattern for compressed encoding
- Update JSON serialization with backward-compatible format
- Add comprehensive unit tests for new functionality

The new mode compresses values by removing bits in a specified range
that must be zero, allowing more efficient storage while maintaining
decodability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Update bit pattern encoding to use C++ conventions with half-open
intervals [bitStart, bitEnd) instead of inclusive ranges.

Changes:
- Update PrefixConfig constructor to use exclusive upper bound
- Adjust encodeBitPattern loop condition (< instead of <=)
- Fix decodeBitPattern shift calculation
- Update all documentation to reflect half-open intervals
- Update all unit tests with corrected bit ranges

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Johannes Kalmbach <[email protected]>
Enable users to specify bit pattern encoding via IndexBuilderConfig
and propagate it through to the EncodedIriManager.

Changes:
- Add prefixesForIdEncodedIrisWithBitPattern_ to IndexBuilderConfig
- Add setPrefixesForEncodedValuesWithBitPattern() to IndexImpl
- Update Qlever.cpp to call new configuration method
- Update IndexTestHelpers to handle both plain and bit pattern modes
- Maintain backward compatibility with existing plain prefix configs

Usage example in Qlever.h:
  config.prefixesForIdEncodedIris_ = {"http://example.org/"};
  config.prefixesForIdEncodedIrisWithBitPattern_ = {
    {"http://bitpattern.org/", 10, 16}  // bits [10, 16) must be zero
  };

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@sparql-conformance
Copy link

Overview

Number of Tests Passed ✅ Failed ❌ Intended ⚠️ Not tested
522 439 16 67 0

Conformance check passed ✅

No test result changes.

Details: https://qlever.dev/sparql-conformance-ui?cur=ec02623f1e6d394d03c6632a5136c4f5256bcdbd&prev=b105427beac0ccd8ed85dd3eb6000786f7219f22

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