MCPcopy Create free account
hub / github.com/apache/paimon-rust / ok_result

Function ok_result

crates/integrations/datafusion/src/sql_context.rs:2292–2304  ·  view source on GitHub ↗

Return an empty DataFrame with a single "result" column containing "OK".

(ctx: &SessionContext)

Source from the content-addressed store, hash-verified

2290
2291/// Return an empty DataFrame with a single "result" column containing "OK".
2292fn 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

Callers 10

sqlMethod · 0.70
handle_create_tableMethod · 0.70
handle_drop_tableMethod · 0.70
handle_alter_tableMethod · 0.70
handle_truncate_tableMethod · 0.70
handle_create_viewMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected