-
Notifications
You must be signed in to change notification settings - Fork 25.3k
QL: Adapt nested fields extraction from "fields" API output to the new un-flattened strucutre #68745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QL: Adapt nested fields extraction from "fields" API output to the new un-flattened strucutre #68745
Conversation
un-flattened structure
Pinging @elastic/es-ql (Team:QL) |
…stic/elasticsearch into 68722_implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
DocumentField field = hit.field(fieldName); | ||
DocumentField field = null; | ||
if (hitName != null) { | ||
// a nested field value is grouped under the nested parent name (ie dep.dep_name lives under "dep":[{dep_name:value}]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// a nested field value is grouped under the nested parent name (ie dep.dep_name lives under "dep":[{dep_name:value}]) | |
// a nested field value is grouped under the nested parent name (ie dep.dep_name lives under "dep":[{"dep_name":value}]) |
// a nested field value is grouped under the nested parent name (ie dep.dep_name lives under "dep":[{dep_name:value}]) | ||
field = hit.field(hitName); | ||
} else { | ||
field = hit.field(fieldName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make sure, the fieldName is in this case a "doc-top-level" field, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fieldName
is the full field name (including the path): dep.dep_name
for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the fast turnaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Integrate "fields" API into QL (elastic#68467) * QL: retry SQL and EQL requests in a mixed-node (rolling upgrade) cluster (elastic#68602) * Adapt nested fields extraction from "fields" API output to the new un-flattened structure (elastic#68745) (cherry picked from commit ee5cc54)
"fields" API ouput for nested fields is returning the values in a way that keeps the relationship between nested documents
Addresses #68722