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

Function test_fn_struct

datafusion/core/tests/dataframe/dataframe_functions.rs:327–346  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

325
326#[tokio::test]
327async fn test_fn_struct() -> Result<()> {
328 let expr = r#struct(vec![col("a"), col("b")]);
329
330 let batches = get_batches(expr).await?;
331
332 assert_snapshot!(
333 batches_to_string(&batches),
334 @r"
335 +--------------------------+
336 | struct(test.a,test.b) |
337 +--------------------------+
338 | {c0: abcDEF, c1: 1} |
339 | {c0: abc123, c1: 10} |
340 | {c0: CBAdef, c1: 10} |
341 | {c0: 123AbcDef, c1: 100} |
342 +--------------------------+
343 ");
344
345 Ok(())
346}
347
348#[tokio::test]
349async fn test_fn_named_struct() -> Result<()> {

Callers

nothing calls this directly

Calls 1

get_batchesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…