Merge pull request #1567 from dataease/pr@dev@fix_time

fix: 数据集文本转日期
This commit is contained in:
Gin 2021-12-30 14:45:57 +08:00 committed by GitHub
commit 57d7a2b980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ public class DorisQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) {
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
} 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 {
fieldName = originField;
}

View File

@ -106,7 +106,7 @@ public class HiveQueryProvider extends QueryProvider {
} else if (f.getDeType() == DeTypeConstants.DE_FLOAT) {
fieldName = String.format(HiveConstants.CAST, originField, HiveConstants.DEFAULT_FLOAT_FORMAT);
} 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 {
fieldName = originField;
}

View File

@ -113,7 +113,7 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) {
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT);
} 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 {
fieldName = originField;
}