Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/qlever/commands/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def relevant_qleverfile_arguments(self) -> dict[str, list[str]]:
"index": [
"input_files",
"cat_input_files",
"geo_cell_grid_level",
"geo_cell_grid_scheme",
"encode_as_id",
"multi_input_json",
"parallel_parsing",
Expand Down Expand Up @@ -290,6 +292,10 @@ def execute(self, args) -> bool:
return False

# Add remaining options.
if args.geo_cell_grid_level:
index_cmd += f" --geo-cell-grid-level {args.geo_cell_grid_level}"
if args.geo_cell_grid_scheme:
index_cmd += f" --geo-cell-grid-scheme {args.geo_cell_grid_scheme}"
if args.encode_as_id:
index_cmd += f" --encode-as-id {args.encode_as_id}"
if args.only_pso_and_pos_permutations:
Expand Down
22 changes: 22 additions & 0 deletions src/qlever/qleverfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,28 @@ def arg(*args, **kwargs):
"large enough to contain the end of at least one statement "
"(default: 10M)",
)
index_args["geo_cell_grid_level"] = arg(
"--geo-cell-grid-level",
type=int,
default=None,
help="Level L of the geo cell grid for WKT literals: the grid "
"cell of each literal is encoded into its ID, which enables the "
"geo cell prefilter for spatial joins; requires VOCABULARY_TYPE "
"on-disk-compressed-geo-split (default: no grid)",
)
index_args["geo_cell_grid_scheme"] = arg(
"--geo-cell-grid-scheme",
type=str,
choices=[
"flat",
"flat-4-shifts",
"hierarchical",
"hierarchical-3-shifts",
],
default=None,
help="Cell assignment scheme of the geo cell grid "
"(default: flat); only relevant with GEO_CELL_GRID_LEVEL > 0",
)
index_args["encode_as_id"] = arg(
"--encode-as-id",
type=str,
Expand Down
6 changes: 6 additions & 0 deletions test/qlever/commands/test_index_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ def test_execute_successful_indexing_without_extras(
args.image = "test_image"
args.multi_input_json = False
args.ulimit = None
args.geo_cell_grid_level = None
args.geo_cell_grid_scheme = None
args.encode_as_id = None
args.parser_buffer_size = None
args.materialized_views = None
Expand Down Expand Up @@ -264,6 +266,8 @@ def test_execute_total_file_size_greater_than_ten_gb(
args.image = "test_image"
args.multi_input_json = False
args.ulimit = None
args.geo_cell_grid_level = None
args.geo_cell_grid_scheme = None
args.encode_as_id = None
args.parser_buffer_size = None
args.materialized_views = None
Expand Down Expand Up @@ -380,6 +384,8 @@ def test_execute_successful_indexing_with_extras_and_show(
args.vocabulary_type = "on-disk-compressed"
args.show = True
args.ulimit = None
args.geo_cell_grid_level = None
args.geo_cell_grid_scheme = None
args.encode_as_id = None
args.parser_buffer_size = None
args.materialized_views = None
Expand Down
2 changes: 2 additions & 0 deletions test/qlever/commands/test_index_other_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def test_relevant_qleverfile_arguments(self):
"index": [
"input_files",
"cat_input_files",
"geo_cell_grid_level",
"geo_cell_grid_scheme",
"encode_as_id",
"multi_input_json",
"parallel_parsing",
Expand Down
Loading