Skip to content

Commit

Permalink
fix json mode default value (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehil authored Jul 31, 2023
1 parent b1fbc6e commit 8caab6f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ public DorisStreamLoad(SparkSettings settings) {
boolean stripOuterArray = Boolean.parseBoolean(streamLoadProp.getOrDefault("strip_outer_array", "false"));
if (readJsonByLine && stripOuterArray) {
throw new IllegalArgumentException("Only one of options 'read_json_by_line' and 'strip_outer_array' can be set to true");
} else if (!readJsonByLine && !stripOuterArray) {
LOG.info("set default json mode: strip_outer_array");
streamLoadProp.put("strip_outer_array", "true");
}
}
LINE_DELIMITER = escapeString(streamLoadProp.getOrDefault("line_delimiter", "\n"));
Expand Down

0 comments on commit 8caab6f

Please sign in to comment.