Fokko commented on code in PR #246:
URL: https://github.com/apache/iceberg-python/pull/246#discussion_r1440214517


##########
pyiceberg/expressions/visitors.py:
##########
@@ -906,7 +906,16 @@ def visit_bound_predicate(self, predicate: 
BoundPredicate[L]) -> BooleanExpressi
 
 
 def translate_column_names(expr: BooleanExpression, file_schema: Schema, 
case_sensitive: bool) -> BooleanExpression:
-    return visit(expr, _ColumnNameTranslator(file_schema, case_sensitive))
+    try:
+        return visit(expr, _ColumnNameTranslator(file_schema, case_sensitive))
+    except ValueError as e:
+        if "Not found in file schema" in str(e):
+            if isinstance(expr, BoundIsNull):
+                return AlwaysTrue()
+            else:
+                return AlwaysFalse()

Review Comment:
   I actually like that more, great suggestion 👍 



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