suxiaogang223 opened a new issue, #1328:
URL: https://github.com/apache/paimon-rust/issues/1328
### Search before asking
- [x] I searched the issues and pull requests for a matching schema-export
API.
### Motivation
A C/C++ caller must construct Arrow batches matching the Paimon table's write
schema. The C API can create a table from resolved schema JSON but does not
expose its corresponding Arrow schema. Reimplementing the type mapping in
each caller can diverge from the Rust writer's validation; querying a catalog
again can also select a different table schema.
### Solution
Add an additive C function:
```c
paimon_error *paimon_table_export_arrow_schema(
const paimon_table *table, void *schema);
```
`schema` points to an initialized empty ArrowSchema. Reuse the core write
schema conversion and the Arrow C Data Interface, borrowing the table and
giving the output an independent release callback. Do not refresh catalog
metadata or change the core type rules. Reject null pointers and a live
output
instead of overwriting it.
### Anything else?
Cover type/order/nullability/field-ID mapping, a real write using the
exported
schema, table/output lifetimes, release and reuse, and invalid pointers. This
proposal was prepared with AI assistance; it does not add another type
mapping.
### Willingness to contribute
- [x] I'm willing to submit a PR!
--
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]