Register session context for the aggregate_test_100.csv file
(
ctx: &SessionContext,
table_name: &str,
)
| 112 | |
| 113 | /// Register session context for the aggregate_test_100.csv file |
| 114 | pub 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 |
| 130 | pub async fn test_table_with_name(name: &str) -> Result<DataFrame> { |
searching dependent graphs…