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

Function count_selected_rows

crates/paimon/src/table/data_evolution_reader.rs:989–1001  ·  view source on GitHub ↗
(
    first_row_id: i64,
    row_count: i64,
    row_ranges: Option<&[RowRange]>,
)

Source from the content-addressed store, hash-verified

987}
988
989fn count_selected_rows(
990 first_row_id: i64,
991 row_count: i64,
992 row_ranges: Option<&[RowRange]>,
993) -> crate::Result<usize> {
994 match row_ranges {
995 Some(ranges) => Ok(expand_selected_row_ids(first_row_id, row_count, ranges).len()),
996 None => usize::try_from(row_count).map_err(|e| Error::DataInvalid {
997 message: format!("Invalid logical row count {row_count}"),
998 source: Some(Box::new(e)),
999 }),
1000 }
1001}
1002
1003#[cfg(test)]
1004mod tests {

Callers

nothing calls this directly

Calls 2

expand_selected_row_idsFunction · 0.85
lenMethod · 0.45

Tested by

no test coverage detected