From ee29fff6a0f2c0b690f44ef9c2d316e83ce5ad05 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Mon, 1 Jul 2024 21:57:36 +0800 Subject: [PATCH] fix(bin): Expose needed types public Signed-off-by: Xuanwo --- src/bin/orc-export.rs | 3 ++- src/bin/orc-stats.rs | 2 +- src/reader/decompress.rs | 2 +- src/stripe.rs | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/bin/orc-export.rs b/src/bin/orc-export.rs index 7c9389ca..13e74505 100644 --- a/src/bin/orc-export.rs +++ b/src/bin/orc-export.rs @@ -34,6 +34,7 @@ enum FileFormat { Json, } +#[allow(clippy::large_enum_variant)] enum OutputWriter { Csv(csv::Writer), Json(json::Writer), @@ -121,7 +122,7 @@ fn main() -> Result<()> { // Have we reached limit on the number of rows? if num_rows > batch.num_rows() as u64 { - num_rows = num_rows - batch.num_rows() as u64; + num_rows -= batch.num_rows() as u64; } else { break; } diff --git a/src/bin/orc-stats.rs b/src/bin/orc-stats.rs index 14aaef4a..6a8432cb 100644 --- a/src/bin/orc-stats.rs +++ b/src/bin/orc-stats.rs @@ -92,7 +92,7 @@ fn print_column_stats(col_stats: &ColumnStatistics) { println!("* Num values: {}", col_stats.number_of_values()); println!("* Has nulls: {}", col_stats.has_null()); - println!(""); + println!(); } fn main() -> Result<()> { diff --git a/src/reader/decompress.rs b/src/reader/decompress.rs index da25aa65..75285db9 100644 --- a/src/reader/decompress.rs +++ b/src/reader/decompress.rs @@ -267,7 +267,7 @@ impl FallibleStreamingIterator for DecompressorIter { } /// A [`Read`]er fulfilling the ORC specification of reading compressed data. -pub(crate) struct Decompressor { +pub struct Decompressor { decompressor: DecompressorIter, offset: usize, is_first: bool, diff --git a/src/stripe.rs b/src/stripe.rs index 0b54e8cc..28301f41 100644 --- a/src/stripe.rs +++ b/src/stripe.rs @@ -88,7 +88,7 @@ impl TryFrom<(&proto::StripeInformation, &proto::StripeStatistics)> for StripeMe } #[derive(Debug)] -pub(crate) struct Stripe { +pub struct Stripe { columns: Vec, /// <(ColumnId, Kind), Bytes> stream_map: Arc, @@ -218,7 +218,7 @@ impl Stripe { } #[derive(Debug)] -pub(crate) struct StreamMap { +pub struct StreamMap { pub inner: HashMap<(u32, Kind), Bytes>, pub compression: Option, }