omkenge commented on code in PR #1693:
URL: https://github.com/apache/iceberg-python/pull/1693#discussion_r1965133015


##########
pyiceberg/table/upsert_util.py:
##########
@@ -86,7 +97,8 @@ def get_rows_to_update(source_table: pa.Table, target_table: 
pa.Table, join_cols
     if rows_to_update:
         rows_to_update_table = pa.concat_tables(rows_to_update)
     else:
-        rows_to_update_table = pa.Table.from_arrays([], 
names=source_table.column_names)
+        empty_arrays = [pa.array([], type=field.type) for field in 
source_table.schema]
+        rows_to_update_table = pa.Table.from_arrays(empty_arrays, 
schema=source_table.schema)

Review Comment:
   This works for me .. Thanks for the suggestion @Fokko 



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