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

Function read_rows

crates/integrations/datafusion/tests/read_tables.rs:78–92  ·  view source on GitHub ↗
(table_name: &str)

Source from the content-addressed store, hash-verified

76}
77
78async fn read_rows(table_name: &str) -> Vec<(i32, String)> {
79 let sql = format!("SELECT id, name FROM paimon.default.{table_name}");
80 let batches = collect_query(&sql)
81 .await
82 .expect("Failed to collect query result");
83
84 assert!(
85 !batches.is_empty(),
86 "Expected at least one batch from table {table_name}"
87 );
88
89 let mut actual_rows = extract_id_name_rows(&batches);
90 actual_rows.sort_by_key(|(id, _)| *id);
91 actual_rows
92}
93
94async fn collect_query(
95 sql: &str,

Calls 2

collect_queryFunction · 0.85
extract_id_name_rowsFunction · 0.85

Tested by

no test coverage detected