This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Description
Environment
- ES: 7.2.0
- sql plugin: 1.2.0
Reproduce step
Create two docs in different index as bellow:
POST test_multi_mapping_01/_doc/
{
"a": {
"b": 1
}
}
POST test_multi_mapping_02/_doc/
{
"a": {
"b": 1,
"c": 2
}
}
Report error when apply the multi-index query via. SQL:
GET _opendistro/_sql
{
"query": "SELECT * FROM test_multi_mapping_*"
}
{
"error": {
"reason": "Invalid SQL query",
"details": "Different mappings are not allowed for the same field[a]: found [{properties:{b:{type:long},c:{type:long}}}] and [{properties:{b:{type:long}}}] ",
"type": "VerificationException"
},
"status": 400
}
#46 is trying to fix the top level field missing, this case is happened in a nested field which should still be common.