@@ -51,7 +51,7 @@ def project_params(
5151 return CallParameters (
5252 graph_name = graph_name ,
5353 query = query ,
54- concurrency = params [ "concurrency" ] ,
54+ concurrency = params . get ( "concurrency" , 4 ) ,
5555 undirected_relationship_types = params ["undirected_relationship_types" ],
5656 inverse_indexed_relationship_types = params ["inverse_indexed_relationship_types" ],
5757 arrow_configuration = arrow_config ,
@@ -77,15 +77,17 @@ class ProjectProtocolV2(ProjectProtocol):
7777 def project_params (
7878 self , graph_name : str , query : str , job_id : str , params : dict [str , Any ], arrow_config : dict [str , Any ]
7979 ) -> CallParameters :
80+ config = {
81+ "undirectedRelationshipTypes" : params ["undirected_relationship_types" ],
82+ "inverseIndexedRelationshipTypes" : params ["inverse_indexed_relationship_types" ],
83+ }
84+ if "concurrency" in params :
85+ config ["concurrency" ] = params ["concurrency" ]
8086 return CallParameters (
8187 graph_name = graph_name ,
8288 query = query ,
8389 arrow_configuration = arrow_config ,
84- configuration = {
85- "concurrency" : params ["concurrency" ],
86- "undirectedRelationshipTypes" : params ["undirected_relationship_types" ],
87- "inverseIndexedRelationshipTypes" : params ["inverse_indexed_relationship_types" ],
88- },
90+ configuration = config ,
8991 )
9092
9193 def run_projection (
@@ -108,16 +110,19 @@ class ProjectProtocolV3(ProjectProtocol):
108110 def project_params (
109111 self , graph_name : str , query : str , job_id : str , params : dict [str , Any ], arrow_config : dict [str , Any ]
110112 ) -> CallParameters :
113+ config = {
114+ "undirectedRelationshipTypes" : params ["undirected_relationship_types" ],
115+ "inverseIndexedRelationshipTypes" : params ["inverse_indexed_relationship_types" ],
116+ }
117+ if "concurrency" in params :
118+ config ["concurrency" ] = params ["concurrency" ]
119+
111120 return CallParameters (
112121 graph_name = graph_name ,
113122 query = query ,
114123 job_id = job_id ,
115124 arrow_configuration = arrow_config ,
116- configuration = {
117- "concurrency" : params ["concurrency" ],
118- "undirectedRelationshipTypes" : params ["undirected_relationship_types" ],
119- "inverseIndexedRelationshipTypes" : params ["inverse_indexed_relationship_types" ],
120- },
125+ configuration = config ,
121126 )
122127
123128 def run_projection (
0 commit comments