Skip to content

Commit 76dd880

Browse files
authored
recursion was not good yet
1 parent fcf5883 commit 76dd880

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bindings/python/pymongoarrow/schema.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,12 @@ def _get_projection(self):
7878
def _get_field_projection_value(self, fname, ftype, projection):
7979
value = True
8080
if isinstance(ftype, pa.ListType):
81-
fname, ftype, projection = self._get_field_projection_value(fname, ftype.value_field.type, projection)
82-
return fname, ftype, projection
81+
return self._get_field_projection_value(fname, ftype.value_field.type, projection)
8382
if isinstance(ftype, pa.StructType):
8483
for nested_ftype in ftype:
85-
fname, ftype, projection = self._get_field_projection_value(fname + "." + nested_ftype.name, nested_ftype.type, projection)
86-
return fname, ftype, projection
84+
return self._get_field_projection_value(fname + "." + nested_ftype.name, nested_ftype.type, projection)
8785
projection[fname] = value
88-
return fname, ftype, projection
86+
return projection
8987

9088
def __eq__(self, other):
9189
if isinstance(other, type(self)):

0 commit comments

Comments
 (0)