Пример #1
0
 def decode_from_stream(self, in_, nested):
   global IntervalWindow
   if IntervalWindow is None:
     from apache_beam.transforms.window import IntervalWindow
   typed_value = IntervalWindow(None, None)
   typed_value._end_micros = (
       1000 * self._to_normal_time(in_.read_bigendian_uint64()))
   typed_value._start_micros = (
       typed_value._end_micros - 1000 * in_.read_var_int64())
   return typed_value
Пример #2
0
 def decode_from_stream(self, in_, nested):
   global IntervalWindow
   if IntervalWindow is None:
     from apache_beam.transforms.window import IntervalWindow
   typed_value = IntervalWindow(None, None)
   typed_value._end_micros = (
       1000 * self._to_normal_time(in_.read_bigendian_uint64()))
   typed_value._start_micros = (
       typed_value._end_micros - 1000 * in_.read_var_int64())
   return typed_value
 def decode_from_stream(self, in_, nested):
     # type: (create_InputStream, bool) -> IntervalWindow
     if not TYPE_CHECKING:
         global IntervalWindow
         if IntervalWindow is None:
             from apache_beam.transforms.window import IntervalWindow
     # instantiating with None is not part of the public interface
     typed_value = IntervalWindow(None, None)  # type: ignore[arg-type]
     typed_value._end_micros = (
         1000 * self._to_normal_time(in_.read_bigendian_uint64()))
     typed_value._start_micros = (typed_value._end_micros -
                                  1000 * in_.read_var_int64())
     return typed_value