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 data is missing the composite aggregation might be null and transform preview fails with an NPE:
{
"error": {
"root_cause": [
{
"type": "null_pointer_exception",
"reason": """Cannot invoke "org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregation.getBuckets()" because "agg" is null""",
"stack_trace": """org.elasticsearch.ElasticsearchException$1: Cannot invoke "org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregation.getBuckets()" because "agg" is null
at org.elasticsearch.server@8.7.1/org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:668)
caused by:
Caused by: java.lang.NullPointerException: Cannot invoke "org.elasticsearch.search.aggregations.bucket.composite.CompositeAggregation.getBuckets()" because "agg" is null
at org.elasticsearch.xpack.transform.transforms.pivot.AggregationResultUtils.extractCompositeAggregationResults(AggregationResultUtils.java:111)
at org.elasticsearch.xpack.transform.transforms.pivot.Pivot.extractResults(Pivot.java:142)
at org.elasticsearch.xpack.transform.transforms.common.AbstractCompositeAggFunction.lambda$preview$0(AbstractCompositeAggFunction.java:94)
at org.elasticsearch.server@8.7.1/org.elasticsearch.action.ActionListener$2.onResponse(ActionListener.java:167)
hi @hendrikmuhs I have created a PR for this issue, since this looks like a straightforward null check here is the PR: #96785 . If you have any suggestions please do let me know as I'm new to open source.
If data is missing the composite aggregation might be
null
and transform preview fails with an NPE:caused by:
Fix:
Handle
null
at:https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/transform/src/main/java/org/elasticsearch/xpack/transform/transforms/common/AbstractCompositeAggFunction.java#L90
The text was updated successfully, but these errors were encountered: