danny0405 commented on a change in pull request #10060: [FLINK-14546] 
[flink-json] Support map type in flink-json
URL: https://github.com/apache/flink/pull/10060#discussion_r342362632
 
 

 ##########
 File path: 
flink-formats/flink-json/src/test/java/org/apache/flink/formats/json/JsonRowDeserializationSchemaTest.java
 ##########
 @@ -61,19 +65,21 @@ public void testTypeInfoDeserialization() throws Exception 
{
                root.put("id", id);
                root.put("name", name);
                root.put("bytes", bytes);
+               root.putObject("map").put("flink", 123);
 
                byte[] serializedJson = objectMapper.writeValueAsBytes(root);
 
                JsonRowDeserializationSchema deserializationSchema = new 
JsonRowDeserializationSchema.Builder(
                        Types.ROW_NAMED(
-                               new String[]{"id", "name", "bytes"},
-                               Types.LONG, Types.STRING, 
Types.PRIMITIVE_ARRAY(Types.BYTE))
+                               new String[]{"id", "name", "bytes", "map"},
+                               Types.LONG, Types.STRING, 
Types.PRIMITIVE_ARRAY(Types.BYTE), Types.MAP(Types.STRING, Types.LONG))
 
 Review comment:
   Thanks @libenchao ,basically good, do you think we can add a test case with 
nested map type, say the map value is also a map.

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