Register a JSON array table and run a query
(content: &str, query: &str)
| 80 | |
| 81 | /// Register a JSON array table and run a query |
| 82 | async fn query_json_array(content: &str, query: &str) -> Result<Vec<RecordBatch>> { |
| 83 | let (_tmp_dir, path) = create_temp_json(content); |
| 84 | let ctx = SessionContext::new(); |
| 85 | let options = JsonReadOptions::default().newline_delimited(false); |
| 86 | ctx.register_json("test_table", &path, options).await?; |
| 87 | ctx.sql(query).await?.collect().await |
| 88 | } |
| 89 | |
| 90 | /// Register a JSON array table and run a query, return formatted string |
| 91 | async fn query_json_array_str(content: &str, query: &str) -> Result<String> { |
searching dependent graphs…