fix: doris类型转换
This commit is contained in:
parent
7808aa8bc6
commit
2ecd8dd4d6
@ -41,4 +41,6 @@ public class DorisConstants extends SQLConstants {
|
||||
public static final String BRACKETS = "(%s)";
|
||||
|
||||
public static final String ROUND = "ROUND(%s,%s)";
|
||||
|
||||
public static final String VARCHAR = "VARCHAR";
|
||||
}
|
||||
|
||||
@ -421,6 +421,8 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (field.getDeType() == 1 && field.getDeExtractType() != 1) {
|
||||
String cast = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
whereName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||
} else if (field.getDeType() == 0) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.VARCHAR);
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -462,6 +464,8 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
if (field.getDeType() == 1 && field.getDeExtractType() != 1) {
|
||||
String cast = String.format(DorisConstants.CAST, originName, DorisConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
whereName = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||
} else if (field.getDeType() == 0) {
|
||||
whereName = String.format(DorisConstants.CAST, originName, DorisConstants.VARCHAR);
|
||||
} else {
|
||||
whereName = originName;
|
||||
}
|
||||
@ -534,6 +538,8 @@ public class DorisQueryProvider extends QueryProvider {
|
||||
String from_unixtime = String.format(DorisConstants.FROM_UNIXTIME, cast, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||
fieldName = String.format(DorisConstants.DATE_FORMAT, from_unixtime, format);
|
||||
}
|
||||
} else if (x.getDeType() == 0) {
|
||||
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.VARCHAR);
|
||||
} else {
|
||||
fieldName = originField;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user