Skip to content

Commit aece4fd

Browse files
authored
revert remove_metadata change
Signed-off-by: Xinyuan <43737116+xinyuangui2@users.noreply.github.com>
1 parent 5659817 commit aece4fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

python/ray/data/_internal/arrow_ops/transform_pyarrow.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,12 @@ def unify_schemas(
306306
# Deduplicate schemas. Calling this before PyArrow's unify_schemas is more efficient (100x faster).
307307

308308
# Remove metadata for hashability
309-
schemas[0] = schemas[0].remove_metadata()
309+
schemas[0].remove_metadata()
310310
schemas_to_unify = [schemas[0]]
311-
for i in range(1, len(schemas)):
312-
schemas[i] = schemas[i].remove_metadata()
313-
if not schemas[i].equals(schemas[0]):
314-
schemas_to_unify.append(schemas[i])
311+
for schema in schemas[1:]:
312+
schema.remove_metadata()
313+
if not schema.equals(schemas[0]):
314+
schemas_to_unify.append(schema)
315315

316316
pyarrow_exception = None
317317
# If there is only one schema, return it

0 commit comments

Comments
 (0)