为了更快的定位您的问题,请提供以下信息,谢谢
【详述】starrocks创建es catalog,es索引中存在datetime类型字段reportTime,并且指定"format": “epoch_millis”,此时查询“select * from xxx_index”正常,但是查询“select reportTime from xxx_index”时则报错:Expected value of type: DATETIME; but found type: Varchar/Char; Document slice is : “1719677592331”. 使用“SELECT get_json_string(headers, “$.connection”) AS ttt, reportTime FROM xxx_index
;”时也能正常查询。但是去掉get_json_string()函数或者该函数的参数不是索引中的某个字段时也会报错。看样子可能是json解析的问题。
【背景】使用es catalog将es数据迁移到starrocks
【业务影响】es数据迁移无法正常进行
【是否存算分离】
【StarRocks版本】staarrocks 3.2.2,es版本7.17.3
【集群规模】
【机器信息】
【联系方式】xh_zhou01@163.com
【附件】
be.warn:
index信息:
{
"mappings": {
"_doc": {
"properties": {
"@timestamp": {
"type": "date"
},
"@version": {
"type": "keyword",
"ignore_above": 256
},
"accountType": {
"type": "keyword",
"ignore_above": 256
},
"biz": {
"type": "keyword",
"ignore_above": 256
},
"count": {
"type": "long"
},
"headers": {
"properties": {
"connection": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"content_length": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"content_type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"http_host": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"http_user_agent": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"http_version": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"request_method": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"request_path": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"host": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"partyId": {
"type": "keyword",
"ignore_above": 256
},
"read_timestamp": {
"type": "date"
},
"reportTime": {
"type": "date",
"format": "epoch_millis"
}
}
}
}
}