[Enhance](DOE)Support parse default es iso datetime string (#17412)
* support parse default es iso datetime string
This commit is contained in:
@ -301,12 +301,13 @@ public class EsUtil {
|
||||
boolean bigIntFlag = false;
|
||||
for (String format : formats) {
|
||||
// pre-check format
|
||||
if (!ALLOW_DATE_FORMATS.contains(format)) {
|
||||
String trimFormat = format.trim();
|
||||
if (!ALLOW_DATE_FORMATS.contains(trimFormat)) {
|
||||
column.setComment(
|
||||
"Elasticsearch type is date, format is " + format + " not support, use String type");
|
||||
"Elasticsearch type is date, format is " + trimFormat + " not support, use String type");
|
||||
return ScalarType.createStringType();
|
||||
}
|
||||
switch (format) {
|
||||
switch (trimFormat) {
|
||||
case "yyyy-MM-dd HH:mm:ss":
|
||||
dateTimeFlag = true;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user