You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] JOIN query with object field in joined condition return nothing #1135
If a JOIN query uses object field in ON clause as joined condition, it will return empty.
How can one reproduce the bug?
PUT join-object-test/_doc/1
{
"account.name.first": "John"
}
POST _plugins/_sql
{
"query" : """
SELECT
p.account.name.first
FROM join-object-test p
JOIN join-object-test y
ON p.account.name.first = y.account.name.first
"""
}
After more test, I found out that the root cause is OpenSearch has different response format for object field. For the join-object-test index above, it returns:
Activity
dai-chen commentedon Jan 5, 2023
After more test, I found out that the root cause is OpenSearch has different response format for object field. For the
join-object-testindex above, it returns:But if the doc with object field is created in the way as follows:
OpenSearch returns:
Although both indexes have the exactly same mapping:
So the issue seems not only for JOIN in legacy code. V2 code also assumes the first response format. Need more investigation to confirm.
dai-chen commentedon Jan 5, 2023
More tests for different response format: