WeiZhong94 commented on a change in pull request #10086: [FLINK-14584][python] 
Support complex data types in Python user-defined functions
URL: https://github.com/apache/flink/pull/10086#discussion_r353093687
 
 

 ##########
 File path: flink-python/pyflink/fn_execution/tests/coders_test_common.py
 ##########
 @@ -73,13 +74,34 @@ def test_binary_coder(self):
 
     def test_char_coder(self):
         coder = CharCoder()
-        self.check_coder(coder, 'flink')
+        self.check_coder(coder, 'flink', '🐿')
 
     def test_date_coder(self):
         import datetime
         coder = DateCoder()
         self.check_coder(coder, datetime.date(2019, 9, 10))
 
+    def test_array_coder(self):
+        element_coder = BigIntCoder()
+        coder = ArrayCoder(element_coder)
+        self.check_coder(coder, [1, 2, 3, None])
+
+    def test_map_coder(self):
+        key_coder = CharCoder()
+        value_coder = BigIntCoder()
+        coder = MapCoder(key_coder, value_coder)
+        self.check_coder(coder, {'flink': 1, 'pyflink': 2, 'coder': None})
+
+    def test_multiset_coder(self):
+        element_coder = CharCoder()
+        coder = MultisetCoder(element_coder)
+        self.check_coder(coder, ['flink', 'flink', 'pyflink'])
+
+    def test_decimal_coder(self):
+        from decimal import Decimal
+        coder = DecimalCoder()
 
 Review comment:
   How about test with different precision?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to