rymurr commented on a change in pull request #2908:
URL: https://github.com/apache/iceberg/pull/2908#discussion_r680762075



##########
File path: python/iceberg/api/transforms/identity.py
##########
@@ -62,13 +62,12 @@ def to_human_string(self, value):
             else:
                 return TransformUtil.human_timestamp_without_timezone(value)
         elif self.type_var.type_id in (TypeID.BINARY, TypeID.FIXED):
-            raise NotImplementedError()
-            # if isinstance(value, bytearray):
-            #     return base64.b64encode(value)
-            # elif isinstance(value, bytes):
-            #     return base64.b64encode(bytes(value))
-            # else:
-            #     raise RuntimeError("Unsupported binary type: %s" % 
value.__class__.__name__)
+            if isinstance(value, bytearray):

Review comment:
       nit: why use two branches instead of an `or`

##########
File path: python/iceberg/api/transforms/transform_util.py
##########
@@ -59,7 +60,7 @@ def human_hour(hour_ordinal):
 
     @staticmethod
     def base_64_encode(buffer):
-        raise NotImplementedError()

Review comment:
       similar to the other PR this should probably be a set of functions 
rather than static methods in a class




-- 
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]

Reply via email to