Return an empty DataFrame with a single "result" column containing "OK".
(ctx: &SessionContext)
| 2290 | |
| 2291 | /// Return an empty DataFrame with a single "result" column containing "OK". |
| 2292 | fn ok_result(ctx: &SessionContext) -> DFResult<DataFrame> { |
| 2293 | let schema = Arc::new(Schema::new(vec![Field::new( |
| 2294 | "result", |
| 2295 | ArrowDataType::Utf8, |
| 2296 | false, |
| 2297 | )])); |
| 2298 | let batch = RecordBatch::try_new( |
| 2299 | schema.clone(), |
| 2300 | vec![Arc::new(StringArray::from(vec!["OK"]))], |
| 2301 | )?; |
| 2302 | let df = ctx.read_batch(batch)?; |
| 2303 | Ok(df) |
| 2304 | } |
| 2305 | |
| 2306 | /// Registers the built-in table-valued functions against `catalog` so they can |
| 2307 | /// be used in SQL without any extra setup call. Called for every catalog |
no outgoing calls
no test coverage detected