rdblue commented on code in PR #53: URL: https://github.com/apache/iceberg-python/pull/53#discussion_r1353376710
########## pyiceberg/utils/schema_conversion.py: ########## @@ -565,10 +566,17 @@ def map(self, map_type: MapType, key_result: AvroType, value_result: AvroType) - } def visit_fixed(self, fixed_type: FixedType) -> AvroType: - return {"type": "fixed", "size": len(fixed_type)} + return {"type": "fixed", "size": len(fixed_type), "name": f"fixed_{len(fixed_type)}"} def visit_decimal(self, decimal_type: DecimalType) -> AvroType: - return {"type": "bytes", "logicalType": "decimal", "precision": decimal_type.precision, "scale": decimal_type.scale} + return { + "type": "fixed", + "size": decimal_required_bytes(decimal_type.precision), + "logicalType": "decimal", + "precision": decimal_type.precision, + "scale": decimal_type.scale, + "name": f"decimal_{decimal_type.precision}_{decimal_type.scale}", + } Review Comment: These changes look correct to me. Thanks, @HonahX! -- 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