Skip to content

Commit d5dba3a

Browse files
authored
fix: failing test fix
1 parent 8b1d527 commit d5dba3a

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

awswrangler/athena/_write_iceberg.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -569,17 +569,16 @@ def to_iceberg( # noqa: PLR0913
569569
# Ensure that the ordering of the DF is the same as in the catalog.
570570
# This is required for the INSERT command to work.
571571
# update catalog_cols after altering table
572-
catalog_column_types = typing.cast(
573-
Dict[str, str],
574-
catalog.get_table_types(
575-
database=database,
576-
table=table,
577-
catalog_id=catalog_id,
578-
filter_iceberg_current=True,
579-
boto3_session=boto3_session,
580-
),
572+
_, catalog_cols = _determine_differences(
573+
df=df,
574+
database=database,
575+
table=table,
576+
index=index,
577+
partition_cols=partition_cols,
578+
boto3_session=boto3_session,
579+
dtype=dtype,
580+
catalog_id=catalog_id,
581581
)
582-
catalog_cols = [key for key in catalog_column_types]
583582
df = df[catalog_cols]
584583

585584
# if mode == "overwrite_partitions", drop matched partitions

0 commit comments

Comments
 (0)