in adb2client/src/main/java/com/alibaba/cloud/analyticdb/adbclient/AdbClient.java [328:357]
public void addStrictMap(String table, Map<String, String> oriMap) {
String tableName = table.toLowerCase();
Map<String, String> dataMap = new HashMap<String, String>();
for (Map.Entry<String, String> entry : oriMap.entrySet()) {
dataMap.put(entry.getKey().toLowerCase(), entry.getValue());
}
if (this.tableInfo.get(tableName) == null) {
initNewTable(tableName);
if (this.tableInfo.get(tableName) == null) {
throw new AdbClientException(AdbClientException.ADD_DATA_ERROR, "The table " + table + " do not exist", null);
}
}
Row row = mapToRow(tableName, dataMap);
if (dataMap.size() > 0) {
if (!this.isAllColumn.get(tableName)) {
throw new AdbClientException(AdbClientException.ADD_DATA_ERROR, "The column " + dataMap.keySet().toString() + " of table " + tableName + " do not exist", null);
}
dataMap.clear();
initNewTable(tableName);
for (Map.Entry<String, String> entry : oriMap.entrySet()) {
dataMap.put(entry.getKey().toLowerCase(), entry.getValue());
}
row = mapToRow(tableName, dataMap);
if (dataMap.size() > 0) {
throw new AdbClientException(AdbClientException.ADD_DATA_ERROR, "The columns " + dataMap.keySet().toString() + " of table " + tableName + " do not exist", null);
}
commitSingleTable(tableName);
}
addRow(tableName, row);
}