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

Function register_aggregate_csv

datafusion/core/src/test_util/mod.rs:114–127  ·  view source on GitHub ↗

Register session context for the aggregate_test_100.csv file

(
    ctx: &SessionContext,
    table_name: &str,
)

Source from the content-addressed store, hash-verified

112
113/// Register session context for the aggregate_test_100.csv file
114pub async fn register_aggregate_csv(
115 ctx: &SessionContext,
116 table_name: &str,
117) -> Result<()> {
118 let schema = aggr_test_schema();
119 let testdata = arrow_test_data();
120 ctx.register_csv(
121 table_name,
122 &format!("{testdata}/csv/aggregate_test_100.csv"),
123 CsvReadOptions::new().schema(schema.as_ref()),
124 )
125 .await?;
126 Ok(())
127}
128
129/// Create a table from the aggregate_test_100.csv file with the specified name
130pub async fn test_table_with_name(name: &str) -> Result<DataFrame> {

Callers 3

test_table_with_nameFunction · 0.70

Calls 6

arrow_test_dataFunction · 0.85
newFunction · 0.85
aggr_test_schemaFunction · 0.70
register_csvMethod · 0.45
schemaMethod · 0.45
as_refMethod · 0.45

Tested by 2

test_table_with_nameFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…