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 2022/01/10 21:36:52 UTC

[GitHub] [iceberg] rdblue commented on a change in pull request #3839: Expanding primitive types to individual classes

rdblue commented on a change in pull request #3839:
URL: https://github.com/apache/iceberg/pull/3839#discussion_r781570743



##########
File path: python/src/iceberg/types.py
##########
@@ -157,15 +157,107 @@ def value(self) -> NestedField:
         return self._value_field
 
 
-BooleanType = Type("boolean", "BooleanType", is_primitive=True)
-IntegerType = Type("int", "IntegerType", is_primitive=True)
-LongType = Type("long", "LongType", is_primitive=True)
-FloatType = Type("float", "FloatType", is_primitive=True)
-DoubleType = Type("double", "DoubleType", is_primitive=True)
-DateType = Type("date", "DateType", is_primitive=True)
-TimeType = Type("time", "TimeType", is_primitive=True)
-TimestampType = Type("timestamp", "TimestampType", is_primitive=True)
-TimestamptzType = Type("timestamptz", "TimestamptzType", is_primitive=True)
-StringType = Type("string", "StringType", is_primitive=True)
-UUIDType = Type("uuid", "UUIDType", is_primitive=True)
-BinaryType = Type("binary", "BinaryType", is_primitive=True)
+class Boolean(Type):
+    """`boolean` from https://iceberg.apache.org/#spec/#primitive-types"""
+
+    def __init__(self):
+        super().__init__("boolean", "BooleanType", is_primitive=True)
+
+
+class Integer(Type):
+    """32-bit signed integers: `int` from https://iceberg.apache.org/#spec/#primitive-types"""

Review comment:
       Can you update these links to use `/spec/#primitive-types` rather than with the extra `#` before `spec`? Those links would break soon.




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