You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/11/06 03:02:54 UTC

[GitHub] [iceberg] samredai commented on issue #3464: Types + Filesystem - custom implementations VS Arrow

samredai commented on issue #3464:
URL: https://github.com/apache/iceberg/issues/3464#issuecomment-962381119


   One thing I noticed about how types.py is currently is that because the types are a mix of classes (`DecimalType`, `FixedType`, etc) and instances (`BooleanType`, `IntegerType`, etc), checking a type is a little inconsistent. For example:
   ```py
   type_1 = FixedType(8)
   isinstance(type_1, FixedType)  # True
   
   type_2 = BooleanType
   isinstance(type_2, BooleanType)  # False
   type_2 == BooleanType  # True
   ```
   
   If using dataclasses gives us the expected behavior for all relevant dunder methods (or even 90%, we can override any of them), and it allows us to consolidate the logic in literals.py and types.py, that would cut down the code significantly. I think it's worth trying out and validating against existing tests.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org