Skip to content

Commit f648650

Browse files
authored
fix: Duplicate schema argument in wr.s3.to_parquet() (#2455)
* fix: Duplicate schema argument in wr.s3.to_parquet() Signed-off-by: Anton Kukushkin <[email protected]> * fix: don't pass additional schema Signed-off-by: Anton Kukushkin <[email protected]> * fix: prefer user-passed schema Signed-off-by: Anton Kukushkin <[email protected]> --------- Signed-off-by: Anton Kukushkin <[email protected]>
1 parent 146b443 commit f648650

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

awswrangler/s3/_write_parquet.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def _new_writer(
6464
pyarrow_additional_kwargs["use_dictionary"] = True
6565
if not pyarrow_additional_kwargs.get("write_statistics"):
6666
pyarrow_additional_kwargs["write_statistics"] = True
67+
if not pyarrow_additional_kwargs.get("schema"):
68+
pyarrow_additional_kwargs["schema"] = schema
6769

6870
with open_s3_object(
6971
path=file_path,
@@ -76,7 +78,6 @@ def _new_writer(
7678
writer = pyarrow.parquet.ParquetWriter(
7779
where=f,
7880
compression="NONE" if compression is None else compression,
79-
schema=schema,
8081
**pyarrow_additional_kwargs,
8182
)
8283
yield writer

0 commit comments

Comments
 (0)