Create a table provider with a struct column: `id` (Int32) and `props` (Struct { value: Int32, label: Utf8 })
()
| 75 | |
| 76 | /// Create a table provider with a struct column: `id` (Int32) and `props` (Struct { value: Int32, label: Utf8 }) |
| 77 | fn create_struct_table_provider() -> Arc<MemTable> { |
| 78 | let struct_fields = Fields::from(vec![ |
| 79 | Field::new("value", DataType::Int32, true), |
| 80 | Field::new("label", DataType::Utf8, true), |
| 81 | ]); |
| 82 | let schema = Arc::new(Schema::new(vec![ |
| 83 | Field::new("id", DataType::Int32, true), |
| 84 | Field::new("props", DataType::Struct(struct_fields), true), |
| 85 | ])); |
| 86 | MemTable::try_new(schema, vec![vec![]]) |
| 87 | .map(Arc::new) |
| 88 | .unwrap() |
| 89 | } |
| 90 | |
| 91 | fn create_context() -> SessionContext { |
| 92 | let ctx = SessionContext::new(); |
no test coverage detected
searching dependent graphs…