in eland/field_mappings.py [0:0]
def is_es_agg_compatible(self, es_agg) -> bool:
# Unpack the actual aggregation if this is 'extended_stats/percentiles'
if isinstance(es_agg, tuple):
if es_agg[0] == "extended_stats":
es_agg = es_agg[1]
elif es_agg[0] == "percentiles":
es_agg = "percentiles"
# Except "median_absolute_deviation" which doesn't support bool
if es_agg == "median_absolute_deviation" and self.is_bool:
return False
# Cardinality, Count and mode work for all types
# Numerics and bools work for all aggs
if (
es_agg in {"cardinality", "value_count", "mode"}
or self.is_numeric
or self.is_bool
):
return True
# Timestamps also work for 'min', 'max' and 'avg'
if es_agg in {"min", "max", "avg", "percentiles"} and self.is_timestamp:
return True
return False