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

Function paimon_read_builder_new_scan

bindings/c/src/table.rs:191–210  ·  view source on GitHub ↗
(
    rb: *const paimon_read_builder,
)

Source from the content-addressed store, hash-verified

189/// `rb` must be a valid pointer from `paimon_table_new_read_builder`, or null (returns error).
190#[no_mangle]
191pub unsafe extern "C" fn paimon_read_builder_new_scan(
192 rb: *const paimon_read_builder,
193) -> paimon_result_table_scan {
194 if let Err(e) = check_non_null(rb, "rb") {
195 return paimon_result_table_scan {
196 scan: std::ptr::null_mut(),
197 error: e,
198 };
199 }
200 let state = &*((*rb).inner as *const ReadBuilderState);
201 let scan_state = TableScanState {
202 table: state.table.clone(),
203 filter: state.filter.clone(),
204 };
205 let inner = Box::into_raw(Box::new(scan_state)) as *mut c_void;
206 paimon_result_table_scan {
207 scan: Box::into_raw(Box::new(paimon_table_scan { inner })),
208 error: std::ptr::null_mut(),
209 }
210}
211
212/// Create a new TableRead from a ReadBuilder.
213///

Callers

nothing calls this directly

Calls 1

check_non_nullFunction · 0.85

Tested by

no test coverage detected