chore(mito): expose some symbols (#7373)

chore/expose-symbols:
 ### Commit Summary

 - **Visibility Changes**: Updated visibility of functions in `bulk/part.rs`:
   - Made `record_batch_estimated_size` and `sort_primary_key_record_batch` functions public.
 - **Enhancements**: Enhanced functionality in `memtable.rs` by exposing additional components from `bulk::part`:
   - `BulkPartEncoder`, `BulkPartMeta`, `UnorderedPart`, `record_batch_estimated_size`, and `sort_primary_key_record_batch`.

Signed-off-by: Lei, HUANG <mrsatangel@gmail.com>
This commit is contained in:
Lei, HUANG
2025-12-09 22:33:14 +08:00
committed by GitHub
parent fa2b4e5e63
commit 2f9130a2de
2 changed files with 6 additions and 2 deletions

View File

@@ -57,6 +57,10 @@ pub(crate) mod version;
#[cfg(any(test, feature = "test"))]
pub use bulk::part::BulkPart;
pub use bulk::part::{
BulkPartEncoder, BulkPartMeta, UnorderedPart, record_batch_estimated_size,
sort_primary_key_record_batch,
};
#[cfg(any(test, feature = "test"))]
pub use time_partition::filter_record_batch;

View File

@@ -464,7 +464,7 @@ impl UnorderedPart {
}
/// More accurate estimation of the size of a record batch.
pub(crate) fn record_batch_estimated_size(batch: &RecordBatch) -> usize {
pub fn record_batch_estimated_size(batch: &RecordBatch) -> usize {
batch
.columns()
.iter()
@@ -715,7 +715,7 @@ fn new_primary_key_column_builders(
}
/// Sorts the record batch with primary key format.
fn sort_primary_key_record_batch(batch: &RecordBatch) -> Result<RecordBatch> {
pub fn sort_primary_key_record_batch(batch: &RecordBatch) -> Result<RecordBatch> {
let total_columns = batch.num_columns();
let sort_columns = vec![
// Primary key column (ascending)