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
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:
What is the bug?
If a JOIN query uses object field in
ON
clause as joined condition, it will return empty.How can one reproduce the bug?
What is the expected behavior?
What is your host/environment?
Do you have any additional context?
Code: https://github.com/opensearch-project/sql/blob/2.x/legacy/src/main/java/org/opensearch/sql/legacy/query/planner/physical/node/scroll/SearchHitRow.java#L128
The
getValueOfPath()
finds object field value insource
recursively. However, thesource
is already flatten as below:With a simple check, the problematic query can work. But not sure when the source format is changed. Or this function never work for object field?
The text was updated successfully, but these errors were encountered: