Skip to content

Commit fe6e2f3

Browse files
Mats-SXDarthMax
andcommitted
Expose arrow configuration as a remote projection parameter
Co-authored-by: Max Kießling <max.kiessling@neotechnology.com>
1 parent 85550a9 commit fe6e2f3

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

graphdatascience/graph/graph_remote_project_runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __call__(
2020
concurrency: int = 4,
2121
undirected_relationship_types: Optional[List[str]] = None,
2222
inverse_indexed_relationship_types: Optional[List[str]] = None,
23+
batch_size: Optional[int] = None,
2324
) -> GraphCreateResult:
2425
if inverse_indexed_relationship_types is None:
2526
inverse_indexed_relationship_types = []
@@ -32,6 +33,7 @@ def __call__(
3233
concurrency=concurrency,
3334
undirected_relationship_types=undirected_relationship_types,
3435
inverse_indexed_relationship_types=inverse_indexed_relationship_types,
36+
arrow_configuration={"batchSize": batch_size},
3537
)
3638

3739
result = self._query_runner.call_procedure(

graphdatascience/tests/integration/test_remote_graph_ops.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,17 @@ def test_remote_projection(gds_with_cloud_setup: AuraGraphDataScience) -> None:
4343
assert result["nodeCount"] == 3
4444

4545

46+
@pytest.mark.cloud_architecture
47+
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
48+
def test_remote_projection_with_small_batch_size(gds_with_cloud_setup: AuraGraphDataScience) -> None:
49+
G, result = gds_with_cloud_setup.graph.project(
50+
GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m)", batch_size=10
51+
)
52+
53+
assert G.name() == GRAPH_NAME
54+
assert result["nodeCount"] == 3
55+
56+
4657
@pytest.mark.cloud_architecture
4758
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
4859
def test_remote_write_back_page_rank(gds_with_cloud_setup: AuraGraphDataScience) -> None:

0 commit comments

Comments
 (0)