milesgranger commented on code in PR #14011:
URL: https://github.com/apache/arrow/pull/14011#discussion_r962749817
##########
python/pyarrow/parquet/core.py:
##########
@@ -89,7 +89,9 @@ def _check_filters(filters, check_null_strings=True):
Check if filters are well-formed.
"""
if filters is not None:
- if len(filters) == 0 or any(len(f) == 0 for f in filters):
+ if not hasattr(filters, '__len__') \
Review Comment:
Exactly right; trying to provided a better error than _"Expression type has
no len..."_ type error. First iteration
(https://github.com/apache/arrow/pull/14011/commits/25dcf6af986cfc219a824ea36ea7c0ebb7e63aec)
checked instance, but realized that was unsafe(?) b/c dataset and/or compute
may not be built. Good point one could use duck typing here.
--
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]