You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Rondiz (via GitHub)" <gi...@apache.org> on 2023/06/13 12:34:27 UTC

[GitHub] [iceberg] Rondiz opened a new pull request, #7829: Fix D400 Issue #7776

Rondiz opened a new pull request, #7829:
URL: https://github.com/apache/iceberg/pull/7829

   (no comment)


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


[GitHub] [iceberg] Fokko merged pull request #7829: Fix D400 Issue #7776

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko merged PR #7829:
URL: https://github.com/apache/iceberg/pull/7829


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


[GitHub] [iceberg] Fokko commented on pull request #7829: Fix D400 Issue #7776

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on PR #7829:
URL: https://github.com/apache/iceberg/pull/7829#issuecomment-1590604013

   Thanks @Rondiz for the work, this is awesome! 🥳 


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


[GitHub] [iceberg] mderoy commented on pull request #7829: Fix D400 Issue #7776

Posted by "mderoy (via GitHub)" <gi...@apache.org>.
mderoy commented on PR #7829:
URL: https://github.com/apache/iceberg/pull/7829#issuecomment-1591378510

   adding a comment with https://github.com/apache/iceberg/issues/7776 so that it gets referenced in the ticket :) 


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


[GitHub] [iceberg] Fokko commented on a diff in pull request #7829: Fix D400 Issue #7776

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #7829:
URL: https://github.com/apache/iceberg/pull/7829#discussion_r1229096159


##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -413,34 +413,34 @@ def identifier_to_tuple(identifier: Union[str, Identifier]) -> Identifier:
         If the identifier is a string, it is split into a tuple on '.'. If it is a tuple, it is used as-is.
 
         Args:
-            identifier (str | Identifier: an identifier, either a string or tuple of strings
+            identifier (str | Identifier: an identifier, either a string or tuple of strings.
 
         Returns:
-            Identifier: a tuple of strings
+            Identifier: a tuple of strings.
         """
         return identifier if isinstance(identifier, tuple) else tuple(str.split(identifier, "."))
 
     @staticmethod
     def table_name_from(identifier: Union[str, Identifier]) -> str:
-        """Extracts table name from a table identifier
+        """Extracts table name from a table identifier.
 
         Args:
-            identifier (str | Identifier: a table identifier
+            identifier (str | Identifier: a table identifier.
 
         Returns:
-            str: Table name
+            str: Table name.
         """
         return Catalog.identifier_to_tuple(identifier)[-1]
 
     @staticmethod
     def namespace_from(identifier: Union[str, Identifier]) -> Identifier:
-        """Extracts table namespace from a table identifier
+        """Extracts table namespace from a table identifier.
 
         Args:
-            identifier (str | Identifier: a table identifier
+            identifier (str | Identifier: a table identifier.

Review Comment:
   Found a missing bracket!
   ```suggestion
               identifier (Union[str, Identifier]): a table identifier.
   ```



##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -505,16 +505,16 @@ def pyarrow_to_schema(schema: pa.Schema) -> Schema:
 
 @singledispatch
 def visit_pyarrow(obj: pa.DataType | pa.Schema, visitor: PyArrowSchemaVisitor[T]) -> T:
-    """A generic function for applying a pyarrow schema visitor to any point within a schema
+    """A generic function for applying a pyarrow schema visitor to any point within a schema.
 
-    The function traverses the schema in post-order fashion
+    The function traverses the schema in post-order fashion.
 
     Args:
-        obj(pa.DataType): An instance of a Schema or an IcebergType
-        visitor (PyArrowSchemaVisitor[T]): An instance of an implementation of the generic PyarrowSchemaVisitor base class
+        obj(pa.DataType): An instance of a Schema or an IcebergType.

Review Comment:
   ```suggestion
           obj (Union[pa.DataType, pa.Schema]): An instance of a Schema or an IcebergType.
   ```



##########
python/pyiceberg/serializers.py:
##########
@@ -23,49 +23,49 @@
 
 
 class FromByteStream:
-    """A collection of methods that deserialize dictionaries into Iceberg objects"""
+    """A collection of methods that deserialize dictionaries into Iceberg objects."""
 
     @staticmethod
     def table_metadata(byte_stream: InputStream, encoding: str = "utf-8") -> TableMetadata:
-        """Instantiate a TableMetadata object from a byte stream
+        """Instantiate a TableMetadata object from a byte stream.
 
         Args:
-            byte_stream: A file-like byte stream object
-            encoding (default "utf-8"): The byte encoder to use for the reader
+            byte_stream: A file-like byte stream object.
+            encoding (default "utf-8"): The byte encoder to use for the reader.
         """
         reader = codecs.getreader(encoding)
         metadata = json.load(reader(byte_stream))
         return TableMetadataUtil.parse_obj(metadata)
 
 
 class FromInputFile:
-    """A collection of methods that deserialize InputFiles into Iceberg objects"""
+    """A collection of methods that deserialize InputFiles into Iceberg objects."""
 
     @staticmethod
     def table_metadata(input_file: InputFile, encoding: str = "utf-8") -> TableMetadata:
-        """Create a TableMetadata instance from an input file
+        """Create a TableMetadata instance from an input file.
 
         Args:
-            input_file (InputFile): A custom implementation of the iceberg.io.file.InputFile abstract base class
-            encoding (str): Encoding to use when loading bytestream
+            input_file (InputFile): A custom implementation of the iceberg.io.file.InputFile abstract base class.
+            encoding (str): Encoding to use when loading bytestream.
 
         Returns:
-            TableMetadata: A table metadata instance
+            TableMetadata: A table metadata instance.
 
         """
         with input_file.open() as input_stream:
             return FromByteStream.table_metadata(byte_stream=input_stream, encoding=encoding)
 
 
 class ToOutputFile:
-    """A collection of methods that serialize Iceberg objects into files given an OutputFile instance"""
+    """A collection of methods that serialize Iceberg objects into files given an OutputFile instance..."""

Review Comment:
   ```suggestion
       """A collection of methods that serialize Iceberg objects into files given an OutputFile instance."""
   ```



##########
python/pyiceberg/io/pyarrow.py:
##########
@@ -505,16 +505,16 @@ def pyarrow_to_schema(schema: pa.Schema) -> Schema:
 
 @singledispatch
 def visit_pyarrow(obj: pa.DataType | pa.Schema, visitor: PyArrowSchemaVisitor[T]) -> T:

Review Comment:
   ```suggestion
   def visit_pyarrow(obj: Union[pa.DataType, pa.Schema], visitor: PyArrowSchemaVisitor[T]) -> T:
   ```



##########
python/pyiceberg/conversions.py:
##########
@@ -109,8 +109,9 @@ def _(primitive_type: BooleanType, value_str: str) -> Union[int, float, str, uui
 @handle_none
 def _(primitive_type: PrimitiveType, value_str: str) -> int:
     """
+    Conversion function.

Review Comment:
   This one needs to go a line up, but we can do that in a separate PR.



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


[GitHub] [iceberg] Rondiz commented on a diff in pull request #7829: Fix D400 Issue #7776

Posted by "Rondiz (via GitHub)" <gi...@apache.org>.
Rondiz commented on code in PR #7829:
URL: https://github.com/apache/iceberg/pull/7829#discussion_r1228093780


##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -238,8 +238,8 @@ class Catalog(ABC):
     or tuple of strings.
 
     Attributes:
-        name (str | None): Name of the catalog
-        properties (Properties): Catalog properties
+        name (str | None): Name of the catalog.

Review Comment:
   Thanks! I probably missed something else. I'll look into it asap.



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


[GitHub] [iceberg] Fokko commented on a diff in pull request #7829: Fix D400 Issue #7776

Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #7829:
URL: https://github.com/apache/iceberg/pull/7829#discussion_r1228061815


##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -238,8 +238,8 @@ class Catalog(ABC):
     or tuple of strings.
 
     Attributes:
-        name (str | None): Name of the catalog
-        properties (Properties): Catalog properties
+        name (str | None): Name of the catalog.

Review Comment:
   Just noticed this now:
   ```suggestion
           name (str): Name of the catalog.
   ```



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