mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-06 13:22:57 +00:00
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:
@@ -57,6 +57,10 @@ pub(crate) mod version;
|
|||||||
|
|
||||||
#[cfg(any(test, feature = "test"))]
|
#[cfg(any(test, feature = "test"))]
|
||||||
pub use bulk::part::BulkPart;
|
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"))]
|
#[cfg(any(test, feature = "test"))]
|
||||||
pub use time_partition::filter_record_batch;
|
pub use time_partition::filter_record_batch;
|
||||||
|
|
||||||
|
|||||||
@@ -464,7 +464,7 @@ impl UnorderedPart {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// More accurate estimation of the size of a record batch.
|
/// 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
|
batch
|
||||||
.columns()
|
.columns()
|
||||||
.iter()
|
.iter()
|
||||||
@@ -715,7 +715,7 @@ fn new_primary_key_column_builders(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Sorts the record batch with primary key format.
|
/// 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 total_columns = batch.num_columns();
|
||||||
let sort_columns = vec![
|
let sort_columns = vec![
|
||||||
// Primary key column (ascending)
|
// Primary key column (ascending)
|
||||||
|
|||||||
Reference in New Issue
Block a user