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

Function row_writer_resize_test

datafusion/core/tests/dataframe/mod.rs:2335–2369  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2333
2334#[tokio::test]
2335async fn row_writer_resize_test() -> Result<()> {
2336 let schema = Arc::new(Schema::new(vec![Field::new(
2337 "column_1",
2338 DataType::Utf8,
2339 false,
2340 )]));
2341
2342 let data = RecordBatch::try_new(
2343 schema,
2344 vec![Arc::new(StringArray::from(vec![
2345 Some(
2346 "2a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
2347 ),
2348 Some(
2349 "3a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800",
2350 ),
2351 ]))],
2352 )?;
2353
2354 let ctx = SessionContext::new();
2355 ctx.register_batch("test", data)?;
2356
2357 let sql = r#"
2358 SELECT
2359 count(1)
2360 FROM
2361 test
2362 GROUP BY
2363 column_1"#;
2364
2365 let df = ctx.sql(sql).await?;
2366 df.show_limit(10).await?;
2367
2368 Ok(())
2369}
2370
2371#[tokio::test]
2372async fn with_column_name() -> Result<()> {

Callers

nothing calls this directly

Calls 4

newFunction · 0.85
sqlMethod · 0.80
show_limitMethod · 0.80
register_batchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…