cccs-eric commented on a change in pull request #3988:
URL: https://github.com/apache/iceberg/pull/3988#discussion_r793796699



##########
File path: python_legacy/iceberg/api/types/conversions.py
##########
@@ -90,11 +99,7 @@ def to_byte_buffer(type_id, value):
 
     @staticmethod
     def from_byte_buffer(type_var, buffer_var):
-        return Conversions.internal_from_byte_buffer(type_var.type_id, 
buffer_var)
-
-    @staticmethod
-    def internal_from_byte_buffer(type_id, buffer_var):
         try:
-            return Conversions.from_byte_buff_mapping.get(type_id)(type_id, 
buffer_var)
+            return 
Conversions.from_byte_buff_mapping.get(type_var.type_id)(type_var, buffer_var)
         except KeyError:
-            raise TypeError("Cannot deserialize Type: %s" % type_id)
+            raise TypeError("Cannot deserialize Type: %s" % type_var)

Review comment:
       Yes, it's a KeyError that we are catching, but we are raising a 
TypeError!  Maybe we should do a combination of both.  Let me try something and 
you can comment on it.




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