File tree 2 files changed +16
-1
lines changed
sdks/python/apache_beam/coders
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 113
113
'WindowedValueCoder' ,
114
114
'ParamWindowedValueCoder' ,
115
115
'BigIntegerCoder' ,
116
- 'DecimalCoder'
116
+ 'DecimalCoder' ,
117
+ 'PaneInfoCoder'
117
118
]
118
119
119
120
T = TypeVar ('T' )
@@ -1753,6 +1754,18 @@ def __hash__(self):
1753
1754
return hash (type (self ))
1754
1755
1755
1756
1757
+ class PaneInfoCoder (FastCoder ):
1758
+ def _create_impl (self ):
1759
+ return coder_impl .PaneInfoCoderImpl ()
1760
+
1761
+ def is_deterministic (self ):
1762
+ # type: () -> bool
1763
+ return True
1764
+
1765
+ def to_type_hint (self ):
1766
+ return windowed_value .PaneInfo
1767
+
1768
+
1756
1769
class DecimalCoder (FastCoder ):
1757
1770
def _create_impl (self ):
1758
1771
return coder_impl .DecimalCoderImpl ()
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ def MakeXyzs(v):
73
73
74
74
from apache_beam .coders import coders
75
75
from apache_beam .typehints import typehints
76
+ from apache_beam .utils import windowed_value
76
77
77
78
__all__ = ['registry' ]
78
79
@@ -92,6 +93,7 @@ def register_standard_coders(self, fallback_coder):
92
93
self ._register_coder_internal (bytes , coders .BytesCoder )
93
94
self ._register_coder_internal (bool , coders .BooleanCoder )
94
95
self ._register_coder_internal (str , coders .StrUtf8Coder )
96
+ self ._register_coder_internal (windowed_value .PaneInfo , coders .PaneInfoCoder )
95
97
self ._register_coder_internal (typehints .TupleConstraint , coders .TupleCoder )
96
98
self ._register_coder_internal (typehints .DictConstraint , coders .MapCoder )
97
99
self ._register_coder_internal (
You can’t perform that action at this time.
0 commit comments