Ejemplo n.º 1
0
 def test_cython_char_coder(self):
     data = ['flink', '🐿']
     python_field_coders = [
         coder_impl.CharCoderImpl() for _ in range(len(data))
     ]
     cython_field_coders = [
         fast_coder_impl.CharCoderImpl() for _ in range(len(data))
     ]
     self.check_cython_coder(python_field_coders, cython_field_coders,
                             [data])
Ejemplo n.º 2
0
 def test_cython_map_coder(self):
     data = [{'flink': 1, 'pyflink': 2, 'coder': None}]
     python_field_coders = [
         coder_impl.MapCoderImpl(coder_impl.CharCoderImpl(),
                                 coder_impl.BigIntCoderImpl())
         for _ in range(len(data))
     ]
     cython_field_coders = [
         fast_coder_impl.MapCoderImpl(fast_coder_impl.CharCoderImpl(),
                                      fast_coder_impl.BigIntCoderImpl())
         for _ in range(len(data))
     ]
     self.check_cython_coder(python_field_coders, cython_field_coders,
                             [data])
Ejemplo n.º 3
0
 def get_impl(self):
     return coder_impl.CharCoderImpl()
Ejemplo n.º 4
0
 def _create_impl(self):
     return coder_impl.CharCoderImpl()