-
Notifications
You must be signed in to change notification settings - Fork 191
Open
Description
The starrocks connector handle UNKNOWN data type as same as json. It is unreasonable. So, it need to be modified.
Lines 126 to 135 in cc8689d
case VARCHAR: | |
String sValue = record.getString(pos).toString(); | |
if (columns == null) { | |
return sValue; | |
} | |
StarRocksDataType starRocksDataType = | |
columns.getOrDefault(columnNames[pos], StarRocksDataType.UNKNOWN); | |
if ((starRocksDataType == StarRocksDataType.JSON || | |
starRocksDataType == StarRocksDataType.UNKNOWN) | |
&& (sValue.charAt(0) == '{' || sValue.charAt(0) == '[')) { |
In my opinion, if data type is unknown, we should return origin data.
For example, while starrocks table not has a column named c1, but the user insert data has c1 and c1 value is ""(blank string) through flink, it will encounter IndexOfRangeException.
Metadata
Metadata
Assignees
Labels
No labels