forked from github/dataease
fix: 数据集文本转日期
This commit is contained in:
parent
2dfe2e3cc0
commit
f39f56e0fe
@ -114,7 +114,7 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
} else if (f.getDeType() == 3) {
|
} else if (f.getDeType() == 3) {
|
||||||
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
|
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
|
||||||
} else if (f.getDeType() == 1) {
|
} else if (f.getDeType() == 1) {
|
||||||
fieldName = String.format(DorisConstants.DATE_FORMAT, originField, DorisConstants.DEFAULT_DATE_FORMAT);
|
fieldName = String.format(DorisConstants.STR_TO_DATE, originField, DorisConstants.DEFAULT_DATE_FORMAT);
|
||||||
} else {
|
} else {
|
||||||
fieldName = originField;
|
fieldName = originField;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ public class HiveQueryProvider extends QueryProvider {
|
|||||||
} else if (f.getDeType() == DeTypeConstants.DE_FLOAT) {
|
} else if (f.getDeType() == DeTypeConstants.DE_FLOAT) {
|
||||||
fieldName = String.format(HiveConstants.CAST, originField, HiveConstants.DEFAULT_FLOAT_FORMAT);
|
fieldName = String.format(HiveConstants.CAST, originField, HiveConstants.DEFAULT_FLOAT_FORMAT);
|
||||||
} else if (f.getDeType() == DeTypeConstants.DE_TIME) {
|
} else if (f.getDeType() == DeTypeConstants.DE_TIME) {
|
||||||
fieldName = String.format(HiveConstants.DATE_FORMAT, originField, HiveConstants.DEFAULT_DATE_FORMAT);
|
fieldName = String.format(HiveConstants.STR_TO_DATE, originField, HiveConstants.DEFAULT_DATE_FORMAT);
|
||||||
} else {
|
} else {
|
||||||
fieldName = originField;
|
fieldName = originField;
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ public class MysqlQueryProvider extends QueryProvider {
|
|||||||
} else if (f.getDeType() == 3) {
|
} else if (f.getDeType() == 3) {
|
||||||
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT);
|
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT);
|
||||||
} else if (f.getDeType() == 1) {
|
} else if (f.getDeType() == 1) {
|
||||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, MySQLConstants.DEFAULT_DATE_FORMAT);
|
fieldName = String.format(MySQLConstants.STR_TO_DATE, originField, MySQLConstants.DEFAULT_DATE_FORMAT);
|
||||||
} else {
|
} else {
|
||||||
fieldName = originField;
|
fieldName = originField;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user