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


##########
pyiceberg/expressions/visitors.py:
##########
@@ -869,10 +871,14 @@ class 
_ColumnNameTranslator(BooleanExpressionVisitor[BooleanExpression]):
 
     file_schema: Schema
     case_sensitive: bool
+    projected_field_values: Dict[str, Any]
 
-    def __init__(self, file_schema: Schema, case_sensitive: bool) -> None:
+    def __init__(
+        self, file_schema: Schema, case_sensitive: bool, 
projected_field_values: Optional[Dict[str, Any]] = None

Review Comment:
   This is where the `FROZEN_DICT` comes in:
   
   
https://github.com/apache/iceberg-python/blob/14ee8da8ff73864b271396853aa2ea5e3e3a04b3/pyiceberg/typedef.py#L47-L58
   
   This avoids null-checking :)
   
   ```suggestion
           self, file_schema: Schema, case_sensitive: bool, 
projected_field_values: Dict[str, Any] = EMPTY_DICT
   ```



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

Reply via email to