You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "Fokko (via GitHub)" <gi...@apache.org> on 2023/05/29 19:32:48 UTC

[GitHub] [iceberg] Fokko commented on a diff in pull request #7699: Python: Add support for initial default

Fokko commented on code in PR #7699:
URL: https://github.com/apache/iceberg/pull/7699#discussion_r1209525163


##########
python/pyiceberg/avro/reader.py:
##########
@@ -103,6 +103,19 @@ def skip(self, decoder: BinaryDecoder) -> None:
         return None
 
 
+class DefaultReader(Reader):
+    default_value: Any
+
+    def __init__(self, default_value: Any) -> None:
+        self.default_value = default_value
+
+    def read(self, _: BinaryDecoder) -> Any:
+        return self.default_value
+
+    def skip(self, decoder: BinaryDecoder) -> None:
+        return None

Review Comment:
   Fair point, I've changed it into:
   ```suggestion
           pass
   ```



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