Skip to content

Commit

Permalink
[StarRocks#369][Bugfix] Change the starrocks connector UNKNOWN data t…
Browse files Browse the repository at this point in the history
…ype handle method
  • Loading branch information
vinnerzhang committed Jul 5, 2024
1 parent cc8689d commit c49d188
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,10 @@ private Object typeConvertion(LogicalType type, RowData record, int pos) {
}
StarRocksDataType starRocksDataType =
columns.getOrDefault(columnNames[pos], StarRocksDataType.UNKNOWN);
if ((starRocksDataType == StarRocksDataType.JSON ||
starRocksDataType == StarRocksDataType.UNKNOWN)
if (starRocksDataType == StarRocksDataType.UNKNOWN) {
return sValue;
}
if ((starRocksDataType == StarRocksDataType.JSON)
&& (sValue.charAt(0) == '{' || sValue.charAt(0) == '[')) {
// The json string need to be converted to a json object, and to the json string
// again via JSON.toJSONString in StarRocksJsonSerializer#serialize. Otherwise,
Expand Down

0 comments on commit c49d188

Please sign in to comment.