koenvo commented on code in PR #1830:
URL: https://github.com/apache/iceberg-python/pull/1830#discussion_r2009862953
##########
pyiceberg/table/upsert_util.py:
##########
@@ -39,7 +77,7 @@ def create_match_filter(df: pyarrow_table, join_cols:
list[str]) -> BooleanExpre
functools.reduce(operator.and_, [EqualTo(col, row[col]) for col in
join_cols]) for row in unique_keys.to_pylist()
]
- return AlwaysFalse() if len(filters) == 0 else
functools.reduce(operator.or_, filters)
+ return AlwaysFalse() if len(filters) == 0 else
build_balanced_tree(operator.or_, filters)
Review Comment:
Yes! That's a great change. And this change will only affect when you pass
more than 2 expressions, so you can still keep full control if you want to
build an unbalanced tree yourself.
Let me change this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]