File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3939 literal ,
4040)
4141from pyiceberg .schema import Accessor , Schema
42- from pyiceberg .typedef import L , StructProtocol
42+ from pyiceberg .typedef import L , StructProtocol , IcebergBaseModel , IcebergRootModel
4343from pyiceberg .types import DoubleType , FloatType , NestedField
4444from pyiceberg .utils .singleton import Singleton
45+ from pydantic import model_serializer
4546
4647
4748def _to_unbound_term (term : Union [str , UnboundTerm [Any ]]) -> UnboundTerm [Any ]:
@@ -362,8 +363,9 @@ def __getnewargs__(self) -> Tuple[BooleanExpression]:
362363 return (self .child ,)
363364
364365
365- class AlwaysTrue (BooleanExpression , Singleton ):
366+ class AlwaysTrue (BooleanExpression , Singleton , IcebergRootModel ):
366367 """TRUE expression."""
368+ root : str = "true"
367369
368370 def __invert__ (self ) -> AlwaysFalse :
369371 """Transform the Expression into its negated version."""
@@ -378,8 +380,9 @@ def __repr__(self) -> str:
378380 return "AlwaysTrue()"
379381
380382
381- class AlwaysFalse (BooleanExpression , Singleton ):
383+ class AlwaysFalse (BooleanExpression , Singleton , IcebergRootModel ):
382384 """FALSE expression."""
385+ root : str = "false"
383386
384387 def __invert__ (self ) -> AlwaysTrue :
385388 """Transform the Expression into its negated version."""
You can’t perform that action at this time.
0 commit comments