diff --git a/tests/perf/query_cases/flight_coalesce_aggregations/case.toml b/tests/perf/query_cases/flight_coalesce_aggregations/case.toml new file mode 100644 index 0000000000..6cc20276a9 --- /dev/null +++ b/tests/perf/query_cases/flight_coalesce_aggregations/case.toml @@ -0,0 +1,101 @@ +# Qualification case for the Flight record-batch coalescing on the +# datanode-to-frontend path (#9167). mito2 emits small (2k-row) batches for +# timestamp-major layouts; the coalescer should merge them before they cross +# the internal Flight connection. High-cardinality tags make the aggregate and +# topk outputs wide, so the extra batches are visible end to end. + +[case] +name = "flight_coalesce_aggregations" +description = "Aggregate and topk queries over a high-cardinality direct-SST fixture exercising Flight batch coalescing" + +[scenario] +kind = "direct_readable_sst" +seed = 9167 + +[[scenario.tables]] +database = "public" +name = "flight_coalesce_metrics" +engine = "mito" +append_mode = true +sst_format = "flat" +primary_key = ["host", "instance"] +time_index = "ts" + +[[scenario.tables.columns]] +name = "host" +type = "STRING" +semantic = "tag" +distribution = { kind = "cardinality", values = 16, prefix = "host" } + +[[scenario.tables.columns]] +name = "instance" +type = "STRING" +semantic = "tag" +distribution = { kind = "cardinality", values = 4096, prefix = "instance" } + +[[scenario.tables.columns]] +name = "value" +type = "DOUBLE" +semantic = "field" +distribution = { kind = "deterministic_wave", min = 0.0, max = 1000.0 } + +[[scenario.tables.columns]] +name = "ts" +type = "TIMESTAMP(3)" +semantic = "timestamp" + +[scenario.layout] +regions = 1 +sst_count = 32 +rows_per_sst = 32768 +row_group_size = 8192 +series_count = 4096 +start_unix_nanos = 1_704_067_200_000_000_000 # 2024-01-01T00:00:00Z +step_nanos = 15_000_000_000 +time_range_layout = "non_overlapping_per_sst" +series_layout = "timestamp_major" + +[[scenario.queries]] +name = "aggregation" +kind = "sql" +query = ''' +SELECT host, instance, avg(value), max(value), count(*) +FROM flight_coalesce_metrics +GROUP BY host, instance +ORDER BY host, instance +''' +warmup = 3 +iterations = 9 + +[scenario.queries.thresholds] +max_candidate_latency_regression_pct = 10 + +[[scenario.queries]] +name = "topk" +kind = "sql" +query = ''' +SELECT instance, max(value) +FROM flight_coalesce_metrics +GROUP BY instance +ORDER BY max(value) DESC +LIMIT 100 +''' +warmup = 3 +iterations = 9 + +[scenario.queries.thresholds] +max_candidate_latency_regression_pct = 10 + +[[scenario.queries]] +name = "count_by_host" +kind = "sql" +query = ''' +SELECT host, count(*) +FROM flight_coalesce_metrics +GROUP BY host +''' +warmup = 3 +iterations = 9 + +[scenario.queries.thresholds] +max_candidate_latency_regression_pct = 10