MCPcopy Create free account
hub / github.com/apache/datafusion / test_sum

Function test_sum

datafusion/core/tests/fuzz_cases/aggregate_fuzz.rs:171–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

169
170#[tokio::test(flavor = "multi_thread")]
171async fn test_sum() {
172 let data_gen_config = baseline_config();
173
174 // Queries like SELECT sum(a), sum(distinct) FROM fuzz_table GROUP BY b
175 let query_builder = QueryBuilder::new()
176 .with_table_name("fuzz_table")
177 .with_aggregate_function("sum")
178 .with_distinct_aggregate_function("sum")
179 // sum only works on numeric columns
180 .with_aggregate_arguments(data_gen_config.numeric_columns())
181 .with_dataset_sort_keys(data_gen_config.sort_keys_set.clone())
182 .set_group_by_columns(data_gen_config.all_columns());
183
184 AggregationFuzzerBuilder::from(data_gen_config)
185 .add_query_builder(query_builder)
186 .build()
187 .run()
188 .await;
189}
190
191#[tokio::test(flavor = "multi_thread")]
192async fn test_count() {

Callers

nothing calls this directly

Calls 14

baseline_configFunction · 0.85
newFunction · 0.85
set_group_by_columnsMethod · 0.80
with_table_nameMethod · 0.80
numeric_columnsMethod · 0.80
all_columnsMethod · 0.80
add_query_builderMethod · 0.80
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…