shuiqiangchen commented on a change in pull request #14401:
URL: https://github.com/apache/flink/pull/14401#discussion_r545557068



##########
File path: flink-python/pyflink/common/typeinfo.py
##########
@@ -407,12 +406,12 @@ def to_internal_type(self, obj):
                 raise ValueError("Unexpected tuple %r with RowTypeInfo" % obj)
         else:
             if isinstance(obj, dict):
-                return tuple(obj.get(n) for n in 
self._j_typeinfo.getFieldNames())
+                return tuple(obj.get(n) for n in self.field_names)

Review comment:
       Here we should appy obj.get(field_name), it would return None if the 
field_name does not present in the obj while applying obj[field_name] will get 
a KeyError.




----------------------------------------------------------------
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]


Reply via email to