Skip to content

Commit

Permalink
StructColumn does not have the static valiabe dtype
Browse files Browse the repository at this point in the history
  • Loading branch information
madsbk committed May 2, 2022
1 parent 67f0247 commit 47bc22f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/cudf/cudf/core/column/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ class StructColumn(ColumnBase):
"""

dtype: StructDtype

@property
def base_size(self):
if not self.base_children:
Expand All @@ -36,7 +34,7 @@ def base_size(self):
@classmethod
def from_arrow(cls, data):
size = len(data)
dtype = cudf.core.dtypes.StructDtype.from_arrow(data.type)
dtype = StructDtype.from_arrow(data.type)

mask = data.buffers()[0]
if mask is not None:
Expand Down Expand Up @@ -121,7 +119,7 @@ def _rename_fields(self, names):
Return a StructColumn with the same field values as this StructColumn,
but with the field names equal to `names`.
"""
dtype = cudf.core.dtypes.StructDtype(
dtype = StructDtype(
{name: col.dtype for name, col in zip(names, self.children)}
)
return StructColumn(
Expand Down Expand Up @@ -174,7 +172,7 @@ def serialize(self) -> Tuple[dict, list]:

@classmethod
def deserialize(cls, header: dict, frames: list) -> StructColumn:
header["dtype"] = cls.dtype.__class__.deserialize(*header["dtype"])
header["dtype"] = StructDtype.deserialize(*header["dtype"])
sub_frame_offset = header["sub-frame-offset"]
children = []
for h, b in zip(header["sub-headers"], frames[sub_frame_offset:]):
Expand Down

0 comments on commit 47bc22f

Please sign in to comment.