suxiaogang223 opened a new pull request, #1389: URL: https://github.com/apache/paimon-rust/pull/1389
### Purpose Linked issue: close #1385 Native consumers can currently select root column names through C but cannot pass the structured read types already supported by Rust core. Add a C ReadBuilder entry point for Paimon DataField JSON so callers such as Doris can request nested ROW, ARRAY-element, and MAP-value projections with their field identities intact. ### Brief change log - Add `paimon_read_builder_with_read_type_json`, copying a JSON array of DataFields into the builder and forwarding it to scan planning and reading. - Follow core precedence: the last successful name projection or explicit read type wins. NULL resets the selection, `[]` selects zero columns, and decoding errors preserve the previous selection. - Reuse core read-type and format semantics; document ownership and the distinction from name-based case sensitivity. - Exercise actual Parquet write/read and Arrow C interchange for reordered nested projections, null containers/children, empty containers, zero-column row counts, copied inputs, reset/precedence, invalid JSON/UTF-8, and null builder errors. ### Tests - `cargo +1.95.0 test --locked -p paimon-c --lib`: 99 passed. - Targeted Clippy passed with `-D warnings -A clippy::nonminimal_bool`. Strict Clippy encounters the same six pre-existing `nonminimal_bool` errors reproduced on unmodified main; no source lint suppressions were added. - `cargo +1.95.0 fmt --all -- --check` and `git diff --check`. Local Cargo builds used debug info disabled and incremental compilation disabled. The new end-to-end fixture covers Parquet; other formats reuse the existing core read-type path and were not newly benchmarked. A generated C header was not built locally. ### API and Format Additive C function; existing exported structs and signatures remain unchanged. The input is the existing Paimon DataField JSON representation, not a new storage format. Explicit read types configure the read without mutating the stored table schema. ### Documentation Add a structured-projection example and configuration/ownership rules to the C integration guide. AI assistance: Codex helped develop the implementation, tests, and this description. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
