File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
python/ray/data/_internal/arrow_ops Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments