You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/11/10 07:29:10 UTC

[GitHub] [flink] wangxlong commented on a change in pull request #13972: [FLINK-19912][json] Fix JSON format fails to serialize map value with…

wangxlong commented on a change in pull request #13972:
URL: https://github.com/apache/flink/pull/13972#discussion_r520344156



##########
File path: flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/RowDataToJsonConverters.java
##########
@@ -272,8 +271,10 @@ private RowDataToJsonConverter createMapConverter(
 						case DROP:
 							continue;
 						case FAIL:
-							throw new RuntimeException("Map key is null, please have a check."
-								+ " You can setup null key handling mode to drop entry or replace with a no-null literal.");
+							throw new RuntimeException(String.format(
+								"JSON format doesn't support to serialize map data with null keys. "
+									+ "You can drop null key entries or encode null in literals by specifying %s option.",
+								JsonOptions.MAP_NULL_KEY_LITERAL.key()));

Review comment:
       done~




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