fix:解决impala数据源没对in操作的类型进行处理的问题

This commit is contained in:
marcus 2023-03-13 11:13:46 +08:00
parent 8b3fe64325
commit 9f7a51537c

View File

@ -1069,7 +1069,12 @@ public class ImpalaQueryProvider extends QueryProvider {
String whereValue = "";
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
DatasetTableField field = fieldList.get(0);
if (!request.getIsTree() && (field.getDeExtractType() == DeTypeConstants.DE_INT || field.getDeExtractType() == DeTypeConstants.DE_FLOAT || field.getDeExtractType() == DeTypeConstants.DE_BOOL)) {
whereValue = "(" + StringUtils.join(value, ",") + ")";
} else {
whereValue = "('" + StringUtils.join(value, "','") + "')";
}
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
whereValue = "'%" + value.get(0) + "%'";
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {