cccs-eric commented on a change in pull request #3989:
URL: https://github.com/apache/iceberg/pull/3989#discussion_r793997252
##########
File path: python_legacy/iceberg/api/types/type_util.py
##########
@@ -143,7 +143,30 @@ def visit(arg, visitor): # noqa: ignore=C901
return visitor.list(list_var, element_result)
elif type_var.type_id == TypeID.MAP:
- raise NotImplementedError()
+ # TODO: How could this be improved to avoid copy-pasting the same
logic for key and value fields?
+ map_var = type_var.as_nested_type().asMapType()
+ visitor.field_ids.append(map_var.key_field.field_id)
+ visitor.field_names.append(map_var.key_field.name)
+ try:
+ key_result = visit(map_var.key_type(), visitor)
+ except NotImplementedError:
Review comment:
Except for abstract classes, this error is still thrown at a few spots
in the code:

But for things related to Map, I could only find this:
-
https://github.com/apache/iceberg/blob/master/python_legacy/iceberg/api/types/type_util.py#L172
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]