[improvement][chat]Opt log infos.
Some checks are pending
supersonic CentOS CI / build (21) (push) Waiting to run
supersonic mac CI / build (21) (push) Waiting to run
supersonic ubuntu CI / build (21) (push) Waiting to run
supersonic windows CI / build (21) (push) Waiting to run

This commit is contained in:
jerryjzhang
2025-01-08 20:46:44 +08:00
parent f264b3160f
commit cd863705a4
4 changed files with 27 additions and 15 deletions

View File

@@ -152,7 +152,7 @@ public class ChatWorkflowEngine {
StringUtils.normalizeSpace(parseInfo.getSqlInfo().getCorrectedS2SQL()),
StringUtils.normalizeSpace(parseInfo.getSqlInfo().getQuerySQL()));
} catch (Exception e) {
log.warn("get sql info failed:{}", parseInfo, e);
log.warn("get sql info failed:{}", e);
errorMsg.add(String.format("S2SQL:%s %s", parseInfo.getSqlInfo().getParsedS2SQL(),
e.getMessage()));
}

View File

@@ -119,11 +119,17 @@ public class QueryUtils {
if (StringUtils.isBlank(type)) {
return false;
}
return type.equalsIgnoreCase("int") || type.equalsIgnoreCase("bigint")
|| type.equalsIgnoreCase("tinyint") || type.equalsIgnoreCase("smallint")
|| type.equalsIgnoreCase("float") || type.equalsIgnoreCase("double") || type.equalsIgnoreCase("real")
|| type.equalsIgnoreCase("numeric") || type.toLowerCase().startsWith("decimal")
|| type.toLowerCase().startsWith("uint") || type.toLowerCase().startsWith("int");
return type.equalsIgnoreCase("int")
|| type.equalsIgnoreCase("bigint")
|| type.equalsIgnoreCase("tinyint")
|| type.equalsIgnoreCase("smallint")
|| type.equalsIgnoreCase("float")
|| type.equalsIgnoreCase("double")
|| type.equalsIgnoreCase("real")
|| type.equalsIgnoreCase("numeric")
|| type.toLowerCase().startsWith("decimal")
|| type.toLowerCase().startsWith("uint")
|| type.toLowerCase().startsWith("int");
}
private String getName(String nameEn) {