diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisConstants.java b/backend/src/main/java/io/dataease/provider/doris/DorisConstants.java index 22792a429e..6f9a65f1c8 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisConstants.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisConstants.java @@ -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)"; diff --git a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java index 4e2edef89b..ce05913ede 100644 --- a/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/doris/DorisQueryProvider.java @@ -785,7 +785,11 @@ public class DorisQueryProvider extends QueryProvider { } else if (StringUtils.containsIgnoreCase(request.getTerm(), "like")) { whereValue = "'%" + value + "%'"; } else { - whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value); + 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) @@ -849,7 +853,11 @@ public class DorisQueryProvider extends QueryProvider { whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1)); } } else { - whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0)); + 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)