kevinjqliu commented on PR #1878:
URL: https://github.com/apache/iceberg-python/pull/1878#issuecomment-2830724552

   Leaving this snippet from my stash here for when pyarrow supports comparison 
of complex types. 
   This is a pyarrow compute only implementation
   
   ```
       # filters the source_table for matching rows based on join key columns
       match_expr = functools.reduce(operator.and_, 
[pc.field(col).isin(target_table.column(col)) for col in join_cols])
       matching_source_rows = source_table.filter(match_expr)
   
       # filters the source_table for non-matching rows based on non join key 
columns, these need to be updated
       non_match_expr = functools.reduce(operator.or_, 
[~pc.field(col).isin(target_table.column(col)) for col in non_key_cols])
       rows_to_update_table = matching_source_rows.filter(non_match_expr)
       return rows_to_update_table
   ```


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