@@ -629,3 +629,60 @@ setup:
629629 - match : {values.5.2: 1065204.0}
630630 - match : {values.5.3: "dog"}
631631 - match : {values.5.4: "2021-04-29T21:00:00.000Z"}
632+
633+ ---
634+ " Sort from multiple indices one with aggregate metric double " :
635+ - requires :
636+ test_runner_features : [capabilities]
637+ capabilities :
638+ - method : POST
639+ path : /_query
640+ parameters : []
641+ capabilities : [aggregate_metric_double_implicit_casting_in_aggs]
642+ reason : " Support for casting aggregate metric double implicitly when present in aggregations"
643+
644+ - do :
645+ indices.downsample :
646+ index : test
647+ target_index : test-downsample
648+ body : >
649+ {
650+ "fixed_interval": "1h"
651+ }
652+ - is_true : acknowledged
653+
654+ - do :
655+ indices.create :
656+ index : test-2
657+ body :
658+ mappings :
659+ properties :
660+ some_field :
661+ type : keyword
662+
663+ - do :
664+ bulk :
665+ refresh : true
666+ index : test-2
667+ body :
668+ - ' {"index": {}}'
669+ - ' {"some_field": "im a keyword!"}'
670+
671+ - do :
672+ esql.query :
673+ body :
674+ query : " FROM test-* | SORT some_field, @timestamp | KEEP k8s.pod.network.rx, some_field, @timestamp | LIMIT 2"
675+
676+ - length : {values: 2}
677+ - length : {values.0: 3}
678+ - match : {columns.0.name: "k8s.pod.network.rx"}
679+ - match : {columns.0.type: "aggregate_metric_double"}
680+ - match : {columns.1.name: "some_field"}
681+ - match : {columns.1.type: "keyword"}
682+ - match : {columns.2.name: "@timestamp"}
683+ - match : {columns.2.type: "date"}
684+ - match : {values.0.0: null}
685+ - match : {values.0.1: "im a keyword!"}
686+ - match : {values.0.2: null}
687+ - match : {values.1.1: null}
688+ - match : {values.1.2: "2021-04-28T18:00:00.000Z"}
0 commit comments