HonahX commented on code in PR #352:
URL: https://github.com/apache/iceberg-python/pull/352#discussion_r1477438386


##########
pyiceberg/table/__init__.py:
##########
@@ -133,6 +132,41 @@
 _JAVA_LONG_MAX = 9223372036854775807
 
 
+def _check_schema(table_schema: Schema, other_schema: "pa.Schema") -> None:
+    from pyiceberg.io.pyarrow import _pyarrow_to_schema_without_ids, 
pyarrow_to_schema
+
+    name_mapping = table_schema.name_mapping()

Review Comment:
   ```suggestion
       name_mapping = table_schema.name_mapping
   ```



##########
pyiceberg/table/__init__.py:
##########
@@ -923,7 +957,7 @@ def name_mapping(self) -> NameMapping:
         if name_mapping_json := 
self.properties.get(SCHEMA_NAME_MAPPING_DEFAULT):
             return parse_mapping_from_json(name_mapping_json)
         else:
-            return create_mapping_from_schema(self.schema())
+            return self.schema().name_mapping()

Review Comment:
   ```suggestion
               return self.schema().name_mapping
   ```



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