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
Bug #42997 #48270
base: main
Are you sure you want to change the base?
Bug #42997 #48270
Conversation
…and handling it in the same way it is handled for parentIdFieldMapper
…and handling it in the same way it is handled for parentIdFieldMapper
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.
Thanks @Suchita94, I left two comments. Can you also update the title to be more descriptive ? Something like: "fixed children aggregation with unmapped fields".
@@ -112,16 +112,21 @@ protected void innerWriteTo(StreamOutput out) throws IOException { | |||
|
|||
private void joinFieldResolveConfig(QueryShardContext queryShardContext, ValuesSourceConfig<WithOrdinals> config) { | |||
ParentJoinFieldMapper parentJoinFieldMapper = ParentJoinFieldMapper.getMapper(queryShardContext.getMapperService()); | |||
if (parentJoinFieldMapper != null) { |
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.
Should it be:
if (parentJoinFieldMapper != null) { | |
if (parentJoinFieldMapper == null) { |
?
if (parentJoinFieldMapper != null) { | ||
config.unmapped(true); | ||
return; | ||
} | ||
ParentIdFieldMapper parentIdFieldMapper = parentJoinFieldMapper.getParentIdFieldMapper(childType, false); | ||
if (parentIdFieldMapper != null) { |
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.
Same here ?
if (parentIdFieldMapper != null) { | |
if (parentIdFieldMapper == null) { |
Pinging @elastic/es-analytics-geo (:Analytics/Aggregations) |
Pinging @elastic/es-analytics-geo (Team:Analytics) |
Looks like we got this in #57089. Sorry for letting this languish. |
Added null check and modified test cases