just using trino on my elasticsearch ,ran a query on my accounts index
SELECT * FROM elasticsearch."default".accounts WHERE id = 24862540;
which resulted in an error
SQL Error [58]: Query failed (#20250126_153854_00143_ta2zm): Expected object for field 'customFields' of type ROW: [] [ArrayList]
this was the datatype of "customFields" -> row(customField row(id bigint))
and the index on elasticsearch was
"customFields": {
"properties": {
"customField": {
"properties": {
"id": {
"type": "long"
}
}
},
"value": {
"type": "search_as_you_type",
"doc_values": false,
"max_shingle_size": 3
}
}
}
how should i typecast to get the proper result ?