Fokko commented on code in PR #40: URL: https://github.com/apache/iceberg-python/pull/40#discussion_r1352299345
########## pyiceberg/avro/resolver.py: ########## @@ -192,7 +195,26 @@ def visit_binary(self, binary_type: BinaryType) -> Writer: return BinaryWriter() -def resolve( +CONSTRUCT_WRITER_VISITOR = ConstructWriter() + + +def resolve_writer( + struct_schema: Union[Schema, IcebergType], + write_schema: Union[Schema, IcebergType], +) -> Writer: + """Resolve the file and read schema to produce a reader. + + Args: + struct_schema (Schema | IcebergType): The schema of the Avro file. + write_schema (Schema | IcebergType): The requested read schema which is equal, subset or superset of the file schema. Review Comment: This is very subjective :D > I think the names are still confusing here. When I see data_schema I would expect it to be the schema of the data that is being written. For me, I would assume that the `data_schema` is in memory. `record_schema` and `file_schema` sounds the most natural to me. -- 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