Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/check_license_and_formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion crates/fluss/src/record/kv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions crates/fluss/src/record/kv/value_record_batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32> {
pub(crate) fn record_count(&self) -> Result<i32> {
if self.data.len() < RECORD_BATCH_HEADER_SIZE {
return Err(corrupt(format!(
"value-record batch too short: {} bytes, need {} for header",
Expand All @@ -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<Vec<Range<usize>>> {
pub(crate) fn value_ranges(&self) -> Result<Vec<Range<usize>>> {
let count = self.record_count()?;
if count < 0 {
return Err(corrupt(format!("invalid record count {count}")));
Expand Down Expand Up @@ -108,7 +108,7 @@ impl ValueRecordBatch {
}

/// The underlying batch bytes.
pub fn data(&self) -> &Bytes {
pub(crate) fn data(&self) -> &Bytes {
&self.data
}
}
Expand Down
3 changes: 1 addition & 2 deletions crates/fluss/src/row/binary/iceberg_binary_row_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down