@@ -163,6 +163,7 @@ hj: Benchmark for simple hash joins, testing various join sc
163163smj: Benchmark for simple sort merge joins, testing various join scenarios
164164dict: Benchmark for dictionary-encoded group-by scenarios
165165array_agg_distinct: 1000K-group, two-row-per-group array_agg(DISTINCT) benchmark
166+ grouped_count_distinct: Grouped count(DISTINCT) by key type, group count and distinct cardinality
166167compile_profile: Compile and execute TPC-H across selected Cargo profiles, reporting timing and binary size
167168
168169
@@ -280,6 +281,9 @@ main() {
280281 # Data is generated inline by the suite's load SQL.
281282 echo " projection_subquery: no external data to generate"
282283 ;;
284+ grouped_count_distinct)
285+ echo " grouped_count_distinct: no external data to generate"
286+ ;;
283287 asof_join)
284288 data_asof_join
285289 ;;
@@ -681,6 +685,9 @@ main() {
681685 array_agg_distinct)
682686 run_array_agg_distinct
683687 ;;
688+ grouped_count_distinct)
689+ run_grouped_count_distinct
690+ ;;
684691 compile_profile)
685692 run_compile_profile " ${PROFILE_ARGS[@]} "
686693 ;;
@@ -1813,6 +1820,15 @@ run_dict() {
18131820 debug_run $CARGO_COMMAND --bin dfbench -- dict --iterations 5 -o " ${RESULTS_FILE} " ${QUERY_ARG} ${LATENCY_ARG}
18141821}
18151822
1823+ # Runs grouped DISTINCT counts over inline data with varying key types and cardinalities.
1824+ run_grouped_count_distinct () {
1825+ debug_run env BENCH_NAME=grouped_count_distinct \
1826+ BENCH_RESULTS_FILE=" $( sql_results_file grouped_count_distinct) " \
1827+ GROUPED_DISTINCT_ROWS=" ${GROUPED_DISTINCT_ROWS:- 4000000} " \
1828+ ${QUERY: +BENCH_QUERY=" ${QUERY} " } \
1829+ bash -c " $SQL_CARGO_COMMAND "
1830+ }
1831+
18161832# Runs the data-free high-cardinality array_agg(DISTINCT) SQL benchmark.
18171833run_array_agg_distinct () {
18181834 echo " Running array_agg_distinct benchmark..."
0 commit comments