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

Function create_schema

datafusion/core/benches/sql_planner.rs:62–67  ·  view source on GitHub ↗

Create schema with the specified number of columns

(column_prefix: &str, num_columns: usize)

Source from the content-addressed store, hash-verified

60
61/// Create schema with the specified number of columns
62fn create_schema(column_prefix: &str, num_columns: usize) -> Schema {
63 let fields: Fields = (0..num_columns)
64 .map(|i| Field::new(format!("{column_prefix}{i}"), DataType::Int32, true))
65 .collect();
66 Schema::new(fields)
67}
68
69fn create_table_provider(column_prefix: &str, num_columns: usize) -> Arc<MemTable> {
70 let schema = Arc::new(create_schema(column_prefix, num_columns));

Callers 1

create_table_providerFunction · 0.70

Calls 3

newFunction · 0.85
collectMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…