[Enhance](DOE)Support parse default es iso datetime string (#17412)

* support parse default es iso datetime string
This commit is contained in:
huangzhaowei
2023-03-10 09:59:20 +08:00
committed by GitHub
parent 006f7a91ac
commit 4ba93efc98
11 changed files with 151 additions and 33 deletions

View File

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