rdblue commented on code in PR #6283:
URL: https://github.com/apache/iceberg/pull/6283#discussion_r1033006504


##########
python/pyiceberg/avro/file.py:
##########
@@ -131,15 +130,14 @@ def __enter__(self):
         Returns:
             A generator returning the AvroStructs
         """
-        self.input_stream = self.input_file.open()
+        self.input_stream = BufferedReader(self.input_file.open())
         self.decoder = BinaryDecoder(self.input_stream)
         self.header = self._read_header()
         self.schema = self.header.get_schema()
-        self.file_length = len(self.input_file)
         if not self.read_schema:
             self.reader = visit(self.schema, ConstructReader())
         else:
-            self.reader = resolve(self.schema, self.read_schema)
+            self.reader = cast(StructReader, resolve(self.schema, 
self.read_schema))

Review Comment:
   This fixes a type warning.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to