@@ -393,7 +393,9 @@ count:long | @timestamp:date
393393 0 | 2023-10-23T13:50:00.000Z
394394;
395395
396- multiIndexIpStatsPushableCount
396+ multiIndexIpStatsNonPushableCount
397+ // Could be pushed to Lucene if we knew whether ip fields are single valued or not.
398+ // May still be pushed down on multi-node environments if a node has only the index where client_ip is keyword.
397399required_capability: union_types
398400required_capability: fix_count_pushdown_for_union_types
399401
@@ -405,7 +407,9 @@ count:long
40540714
406408;
407409
408- multiIndexIpStatsPushableCountEval
410+ multiIndexIpStatsNonPushableCountEval
411+ // Could be pushed to Lucene if we knew whether ip fields are single valued or not.
412+ // May still be pushed down on multi-node environments if a node has only the index where client_ip is keyword.
409413required_capability: union_types
410414required_capability: fix_count_pushdown_for_union_types
411415
@@ -418,6 +422,45 @@ count:long
41842214
419423;
420424
425+ multiIndexIpStatsNonPushableCountWithFilter
426+ // Currently not pushable: has 2 aggs and we don't consider multi-typed fields aggregatable.
427+ required_capability: union_types
428+ required_capability: fix_count_pushdown_for_union_types
429+
430+ FROM sample_data, sample_data_ts_long
431+ | STATS count_matching=count(@timestamp::long) WHERE @timestamp::long >= 1698069301543,
432+ total_count=count(@timestamp::long)
433+ ;
434+
435+ count_matching:long | total_count:long
436+ 2 | 14
437+ ;
438+
439+ multiIndexIpStatsPushableCount
440+ required_capability: union_types
441+ required_capability: fix_count_pushdown_for_union_types
442+
443+ FROM sample_data, sample_data_ts_long
444+ | STATS count=count(@timestamp::long)
445+ ;
446+
447+ count:long
448+ 14
449+ ;
450+
451+ multiIndexIpStatsPushableCountEval
452+ required_capability: union_types
453+ required_capability: fix_count_pushdown_for_union_types
454+
455+ FROM sample_data, sample_data_ts_long
456+ | EVAL @timestamp = @timestamp::long
457+ | STATS count=count(@timestamp)
458+ ;
459+
460+ count:long
461+ 14
462+ ;
463+
421464multiIndexIpStringStatsInline2
422465required_capability: union_types
423466required_capability: union_types_agg_cast
0 commit comments