fix: 数据集文本转日期

This commit is contained in:
junjie 2021-12-30 14:44:36 +08:00
parent 2dfe2e3cc0
commit f39f56e0fe
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) { } 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;
} }

View File

@ -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;
} }

View File

@ -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;
} }