The GitHub Actions job "CI" on fluss.git/filter-server-client-integration has 
succeeded.
Run started by GitHub user wuchong (triggered by wuchong).

Head commit for run:
2023a9c0c6c43aa8df3ad9e283ddc30421a8fdf2 / Jark Wu <[email protected]>
[common] Refactor FileLogProjection to extract shared single-batch projection 
logic

Extract the duplicated single-batch projection logic from projectRecordBatch()
and project() into a shared private method projectSingleBatch().

Previously, both methods contained nearly identical code (~100 lines each) for:
- Parsing log header (magic, isAppendOnly, statisticsLength, changeTypeBytes)
- Reading arrow header and metadata from FileChannel
- Calling projectArrowBatch() to compute projected nodes and buffers
- Computing newBatchSizeInBytes
- Serializing projected arrow metadata
- Updating log header (length, clearing statistics)
- Building the MultiBytesView with projected buffers

The new projectSingleBatch(FileChannel, int, ProjectionInfo, Builder, int)
method consolidates this logic with a maxBytes parameter:
- Returns the projected batch size on success
- Returns -1 if the projected size exceeds maxBytes (without writing to builder)
- projectRecordBatch() calls it with Integer.MAX_VALUE (no size limit)
- project() calls it with the remaining maxBytes budget

Each caller retains its own specific handling:
- projectRecordBatch: returns empty builder for empty batches
- project: copies raw empty batches to push forward log offset,
  caches ProjectionInfo via prevSchemaId, and checks file boundaries

This reduces ~50 lines of duplicated code and ensures future maintenance
only needs to update the projection logic in one place.

Report URL: https://github.com/apache/fluss/actions/runs/24124071428

With regards,
GitHub Actions via GitBox

Reply via email to