HuangXingBo commented on a change in pull request #16220:
URL: https://github.com/apache/flink/pull/16220#discussion_r656033766



##########
File path: docs/content/docs/dev/python/datastream/data_types.md
##########
@@ -94,22 +94,51 @@ Explicit types allow PyFlink to use efficient serializers 
when moving records th
 
 ## Supported Data Types
 
-You can use `pyflink.common.typeinfo.Types` to specify types in Python 
DataStream API. 
-The table below shows the type supported now and how to define them:
+You can use `pyflink.common.typeinfo.Types` to define types in Python 
DataStream API. 
+The table below shows the types supported now and how to define them:
 
-| PyFlink Type | Usage |  Corresponding Python Type |
+| PyFlink Type |  Python Type |  Java Type |

Review comment:
       change the corresponding doc in zh?

##########
File path: flink-python/pyflink/datastream/utils.py
##########
@@ -66,7 +66,8 @@ def pickled_bytes_to_python_converter(data, field_type):
         elif field_type == Types.FLOAT():
             return field_type.from_internal_type(ast.literal_eval(data))
         elif isinstance(field_type, BasicArrayTypeInfo) or \
-                isinstance(field_type, PrimitiveArrayTypeInfo):
+                isinstance(field_type, PrimitiveArrayTypeInfo) or \

Review comment:
       change to `isinstance(field_type, (BasicArrayTypeInfo, 
PrimitiveArrayTypeInfo, ObjectArrayTypeInfo))`

##########
File path: flink-python/pyflink/fn_execution/coders.py
##########
@@ -36,7 +36,7 @@
            'SmallIntCoder', 'IntCoder', 'FloatCoder', 'DoubleCoder', 
'BinaryCoder', 'CharCoder',
            'DateCoder', 'TimeCoder', 'TimestampCoder', 
'LocalZonedTimestampCoder',
            'BasicArrayCoder', 'PrimitiveArrayCoder', 'MapCoder', 
'DecimalCoder', 'BigDecimalCoder',
-           'TupleCoder', 'TimeWindowCoder', 'CountWindowCoder']
+           'TupleCoder', 'TimeWindowCoder', 'CountWindowCoder', 
'ObjectArrayCoder']

Review comment:
       remove `ObjectArrayCoder`

##########
File path: flink-python/pyflink/fn_execution/coders.py
##########
@@ -303,14 +303,14 @@ def __hash__(self):
 
 class BasicArrayCoder(CollectionCoder):

Review comment:
       rename to `GenericArrayCoder`?

##########
File path: flink-python/pyflink/fn_execution/coders.py
##########
@@ -625,6 +625,8 @@ def from_type_info_proto(type_info):
             return 
PrimitiveArrayCoder(from_type_info_proto(type_info.collection_element_type))
         elif field_type_name == type_info_name.BASIC_ARRAY:
             return 
BasicArrayCoder(from_type_info_proto(type_info.collection_element_type))
+        elif field_type_name == type_info_name.OBJECT_ARRAY:
+            return 
ObjectArrayCoder(from_type_info_proto(type_info.collection_element_type))

Review comment:
       `GenericArrayCoder`?




-- 
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:
us...@infra.apache.org


Reply via email to