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

Function test_read_batches_empty

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

Source from the content-addressed store, hash-verified

5005}
5006#[tokio::test]
5007async fn test_read_batches_empty() -> Result<()> {
5008 let config = SessionConfig::new();
5009 let runtime = Arc::new(RuntimeEnv::default());
5010 let state = SessionStateBuilder::new()
5011 .with_config(config)
5012 .with_runtime_env(runtime)
5013 .with_default_features()
5014 .build();
5015 let ctx = SessionContext::new_with_state(state);
5016
5017 let batches = vec![];
5018 let df = ctx.read_batches(batches).unwrap();
5019 df.clone().show().await.unwrap();
5020 let results = df.collect().await?;
5021 assert_snapshot!(
5022 batches_to_sort_string(&results),
5023 @r"
5024 ++
5025 ++
5026 "
5027 );
5028 Ok(())
5029}
5030
5031#[tokio::test]
5032async fn consecutive_projection_same_schema() -> Result<()> {

Callers

nothing calls this directly

Calls 9

newFunction · 0.85
with_default_featuresMethod · 0.80
read_batchesMethod · 0.80
showMethod · 0.80
collectMethod · 0.80
buildMethod · 0.45
with_runtime_envMethod · 0.45
with_configMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…