diff --git a/.github/workflows/check_license_and_formatting.yml b/.github/workflows/check_license_and_formatting.yml index 784e778e..881af9f9 100644 --- a/.github/workflows/check_license_and_formatting.yml +++ b/.github/workflows/check_license_and_formatting.yml @@ -66,3 +66,9 @@ jobs: - name: Clippy run: cargo clippy --all-targets --workspace -- -D warnings + + - name: Rustdoc + # fluss_python is excluded: its [lib] name = "fluss" collides with fluss-rs + run: cargo doc --workspace --no-deps --exclude fluss_python + env: + RUSTDOCFLAGS: -D warnings diff --git a/crates/fluss/src/record/kv/mod.rs b/crates/fluss/src/record/kv/mod.rs index 8f7750a8..4d0f8946 100644 --- a/crates/fluss/src/record/kv/mod.rs +++ b/crates/fluss/src/record/kv/mod.rs @@ -32,7 +32,7 @@ pub use kv_record_batch::*; pub use kv_record_batch_builder::*; pub use kv_record_read_context::{KvRecordReadContext, SchemaGetter}; pub use read_context::ReadContext; -pub use value_record_batch::ValueRecordBatch; +pub(crate) use value_record_batch::ValueRecordBatch; /// Current KV magic value pub const CURRENT_KV_MAGIC_VALUE: u8 = 0; diff --git a/crates/fluss/src/record/kv/value_record_batch.rs b/crates/fluss/src/record/kv/value_record_batch.rs index cfcb4a6d..fdd6b070 100644 --- a/crates/fluss/src/record/kv/value_record_batch.rs +++ b/crates/fluss/src/record/kv/value_record_batch.rs @@ -50,18 +50,18 @@ const RECORD_BATCH_HEADER_SIZE: usize = LENGTH_LENGTH + MAGIC_LENGTH + RECORD_CO const RECORD_LENGTH_LENGTH: usize = 4; /// Read-only view over a serialized value-record batch. -pub struct ValueRecordBatch { +pub(crate) struct ValueRecordBatch { data: Bytes, } impl ValueRecordBatch { /// Wraps raw batch bytes. The batch is expected to start at offset 0. - pub fn new(data: Bytes) -> Self { + pub(crate) fn new(data: Bytes) -> Self { Self { data } } /// Number of records declared in the batch header. - pub fn record_count(&self) -> Result { + pub(crate) fn record_count(&self) -> Result { if self.data.len() < RECORD_BATCH_HEADER_SIZE { return Err(corrupt(format!( "value-record batch too short: {} bytes, need {} for header", @@ -77,7 +77,7 @@ impl ValueRecordBatch { /// Returns one byte range per record, each spanning `[SchemaId | Value]`: /// the payload [`crate::row::FixedSchemaDecoder::decode`] expects. Index /// [`Self::data`] with a returned range to get it without copying. - pub fn value_ranges(&self) -> Result>> { + pub(crate) fn value_ranges(&self) -> Result>> { let count = self.record_count()?; if count < 0 { return Err(corrupt(format!("invalid record count {count}"))); @@ -108,7 +108,7 @@ impl ValueRecordBatch { } /// The underlying batch bytes. - pub fn data(&self) -> &Bytes { + pub(crate) fn data(&self) -> &Bytes { &self.data } } diff --git a/crates/fluss/src/row/binary/iceberg_binary_row_writer.rs b/crates/fluss/src/row/binary/iceberg_binary_row_writer.rs index 4320a622..82a61928 100644 --- a/crates/fluss/src/row/binary/iceberg_binary_row_writer.rs +++ b/crates/fluss/src/row/binary/iceberg_binary_row_writer.rs @@ -37,11 +37,10 @@ const MICROS_PER_MILLI: i64 = 1_000; /// - Variable-length types (string, binary) are written without length prefixes /// - Decimals are written as unscaled big-endian bytes without length prefixes /// -/// The encoded bytes feed directly into [`IcebergBucketingFunction`]'s MurmurHash +/// The encoded bytes feed directly into `IcebergBucketingFunction`'s MurmurHash /// for bucket assignment and must match the Java Fluss server's encoding exactly. /// /// [`CompactedRowWriter`]: crate::row::compacted::CompactedRowWriter -/// [`IcebergBucketingFunction`]: crate::bucketing::IcebergBucketingFunction pub struct IcebergBinaryRowWriter { position: usize, buffer: BytesMut,