Add option --encode-as-id-wide - #331
Open
hannahbast wants to merge 3 commits into
Open
Conversation
This complements ad-freiburg/qlever#3278. In the Qleverfile, write `ENCODE_AS_ID_WIDE`.
The new option was missing from the expected argument list and from the mocked arguments, so three tests saw a `MagicMock` instead of `None` and passed it on to the index command.
There was a problem hiding this comment.
Pull request overview
Adds support for a new index-building option (--encode-as-id-wide) and wires it through the QLeverfile configuration and the qlever index command execution path.
Changes:
- Introduces a new QLeverfile/index argument:
encode_as_id_wide(--encode-as-id-wide). - Passes
--encode-as-id-widethrough to the generatedqlever-indexcommand line. - Updates unit tests to include the new argument in expected argument sets and mocked
args.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/qlever/commands/test_index_other_methods.py |
Extends expected relevant QLeverfile arguments with encode_as_id_wide. |
test/qlever/commands/test_index_execute.py |
Extends mocked args in execute tests to include encode_as_id_wide. |
src/qlever/qleverfile.py |
Adds --encode-as-id-wide to the index-related QLeverfile/CLI argument definitions. |
src/qlever/commands/index.py |
Adds encode_as_id_wide to relevant QLeverfile arguments and appends the flag to the constructed index command. |
Suppressed comments (1)
test/qlever/commands/test_index_execute.py:390
- There is no test that asserts how
encode_as_id_wideaffects the generated index command. Adding a value with a space-separated prefix list here would catch both the presence of the flag and correct shell-quoting behavior.
args.encode_as_id_wide = None
args.parser_buffer_size = None
args.materialized_views = None
args.resource_usage_log = "yes"
args.resource_usage_interval = 1
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
294
to
+297
| if args.encode_as_id: | ||
| index_cmd += f" --encode-as-id {args.encode_as_id}" | ||
| if args.encode_as_id_wide: | ||
| index_cmd += f" --encode-as-id-wide {args.encode_as_id_wide}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for the
--encode-as-id-wideoption of the QLever index builder, which encodes IRIs with up to 17 digits directly in the ID. In the Qleverfile, writeENCODE_AS_ID_WIDE, analogous to the existingENCODE_AS_ID.This change complements ad-freiburg/qlever#3278, which adds the option on the engine side. Without it, an
ENCODE_AS_ID_WIDEline is silently ignored and the index is built with narrow encoding only.