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/02/01 01:07:13 UTC

[GitHub] [iceberg] CircArgs commented on a change in pull request #4016: types use new for generics. no metaprogramming

CircArgs commented on a change in pull request #4016:
URL: https://github.com/apache/iceberg/pull/4016#discussion_r796192638



##########
File path: python/src/iceberg/types.py
##########
@@ -15,61 +15,84 @@
 # specific language governing permissions and limitations
 # under the License.
 """Data types used in describing Iceberg schemas
-
 This module implements the data types described in the Iceberg specification for Iceberg schemas. To
 describe an Iceberg table schema, these classes can be used in the construction of a StructType instance.
-
 Example:
     >>> StructType(
         [
             NestedField(True, 1, "required_field", StringType()),
             NestedField(False, 2, "optional_field", IntegerType()),
         ]
     )
-
 Notes:
   - https://iceberg.apache.org/#spec/#primitive-types
 """
 
-from typing import Optional
+from typing import Any, Dict, List, Optional, Tuple
 
 
-class Type:
-    def __init__(self, type_string: str, repr_string: str, is_primitive=False):
-        self._type_string = type_string
-        self._repr_string = repr_string
-        self._is_primitive = is_primitive
+class IcebergType:

Review comment:
       yeah it conflicts with a common typing primitive `from typing import Type` which is used when typing something that takes a type and not a literal




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