Repository navigation
Conversation
Accept raw and framed splits with the same range and score validation. Let callers name the score column independently of table projections. Match tracked rows by row ID and file-position selections through the deletion-vector-aware reader. Co-Authored-By: Codex <noreply@openai.com> AI-Model: gpt-6 AI-Contributed/Feature: 590/590 AI-Contributed/UT: 0/0
JingsongLi
left a comment
There was a problem hiding this comment.
Java IndexedSplit support addresses the planning-to-read handoff in #1519. I checked raw and framed decoding, built the C header, and ran 109 C tests and 20 related core tests. Two additional end-to-end cases reproduced the issues below.
| "A scored primary-key split must select one physical file", | ||
| )); | ||
| } | ||
| read_positions(read, split, ranges, scores, name) |
There was a problem hiding this comment.
[P1] Preserve managed BLOB payloads when projecting scores on a primary-key split. This branch skips resolving_primary_key_blobs, so the position reader returns the stored descriptor as the value of a projected BLOB column. I wrote b"two" to a PK table with blob-as-descriptor=false and read the same position through the C API. Both unscored reads returned b"two", including with a null score column. Adding a real score changed the BLOB value to a .managed.blob descriptor. Reuse the normal PK payload resolution while retaining score alignment, and cover this in a scored split round trip.
| name: String, | ||
| ) -> crate::Result<ArrowRecordBatchStream> { | ||
| let count = read.read_type.len(); | ||
| let reader = PkVectorIndexedSplitRead::new(read.new_data_file_reader()?); |
There was a problem hiding this comment.
[P2] Do not expose the position reader's internal metadata name restrictions through this API. I wrote an ordinary append table with a user column named __paimon_search_score and requested similarity as the scored output name. The first batch failed with a reserved metadata name error even though the projected names are distinct. Reuse the physical selection and DV logic without appending the internal metadata fields under fixed names, or pass the selected output name all the way through.
Purpose
Closes #1519.
Allow callers to pass a Java-planned indexed split to the reader and retrieve its optional scores alongside projected table fields.
Brief change log
Tests
Added raw/framed decoding comparisons and C read cases for score projection, output names and score alignment after filtering.
Local verification passed with
cargo build --locked -p paimon-c --libandcargo fmt --all -- --check. Test execution is left to upstream CI.API and Format
Adds
TableRead::to_arrow_with_index_scoreandpaimon_read_builder_with_index_score. An explicit score name appends a nullable Float32 column. A projected table field and the score must have distinct names.Documentation
The C binding guide documents accepted split encodings, score projection and the constraints on file-position reads.