rdblue commented on code in PR #40:
URL: https://github.com/apache/iceberg-python/pull/40#discussion_r1349764107


##########
pyiceberg/avro/resolver.py:
##########
@@ -233,7 +255,107 @@ def skip(self, decoder: BinaryDecoder) -> None:
         pass
 
 
-class SchemaResolver(PrimitiveWithPartnerVisitor[IcebergType, Reader]):
+class WriteSchemaResolver(PrimitiveWithPartnerVisitor[IcebergType, Writer]):
+    def schema(self, schema: Schema, expected_schema: Optional[IcebergType], 
result: Writer) -> Writer:
+        return result
+
+    def struct(self, struct: StructType, provided_struct: 
Optional[IcebergType], field_writers: List[Writer]) -> Writer:

Review Comment:
   I think it would be easier to follow the logic here if you used `file_` as a 
prefix for all of the outgoing types. I keep having to remember which one is 
the file schema.



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to