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

Function test_aggregate_ext_order_by

datafusion/core/tests/expr_api/mod.rs:176–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174
175#[tokio::test]
176async fn test_aggregate_ext_order_by() {
177 let agg = first_value_udaf().call(vec![col("props")]);
178
179 // ORDER BY id ASC
180 let agg_asc = agg
181 .clone()
182 .order_by(vec![col("id").sort(true, true)])
183 .build()
184 .unwrap()
185 .alias("asc");
186
187 // ORDER BY id DESC
188 let agg_desc = agg
189 .order_by(vec![col("id").sort(false, true)])
190 .build()
191 .unwrap()
192 .alias("desc");
193
194 evaluate_agg_test(
195 agg_asc,
196 vec![
197 "+-----------------+",
198 "| asc |",
199 "+-----------------+",
200 "| {a: 2021-02-01} |",
201 "+-----------------+",
202 ],
203 )
204 .await;
205
206 evaluate_agg_test(
207 agg_desc,
208 vec![
209 "+-----------------+",
210 "| desc |",
211 "+-----------------+",
212 "| {a: 2021-02-03} |",
213 "+-----------------+",
214 ],
215 )
216 .await;
217}
218
219#[tokio::test]
220async fn test_aggregate_ext_filter() {

Callers

nothing calls this directly

Calls 6

evaluate_agg_testFunction · 0.85
callMethod · 0.45
aliasMethod · 0.45
buildMethod · 0.45
order_byMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…