forked from github/dataease
fix: Doris类型
This commit is contained in:
parent
df28ba462b
commit
d1e56b5784
@ -33,6 +33,8 @@ public class DorisConstants extends SQLConstants {
|
||||
|
||||
public static final String WHERE_VALUE_VALUE = "'%s'";
|
||||
|
||||
public static final String WHERE_NUMBER_VALUE = "%s";
|
||||
|
||||
public static final String AGG_COUNT = "COUNT(*)";
|
||||
|
||||
public static final String AGG_FIELD = "%s(%s)";
|
||||
|
@ -784,9 +784,13 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
} else if (StringUtils.containsIgnoreCase(request.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
} else {
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value);
|
||||
} else {
|
||||
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
.whereTermAndValue(whereTerm + whereValue)
|
||||
@ -848,9 +852,13 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
} else {
|
||||
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||
}
|
||||
} else {
|
||||
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
|
||||
whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
.whereField(whereName)
|
||||
.whereTermAndValue(whereTerm + whereValue)
|
||||
|
Loading…
Reference in New Issue
Block a user