DerGut opened a new pull request, #3766:
URL: https://github.com/apache/iceberg-rust/pull/3766

   ## Which issue does this PR close?
   
   Works toward #1466. Depends on #3709; the serialization commit is separate 
from the reporter API commit.
   
   ## What changes are included in this PR?
   
   A REST reporter needs an Iceberg-compatible JSON request from the reports 
introduced in #3709. This prototype adds `Serialize` for `MetricsReport`, 
`ScanReport`, and `ScanMetrics`, so the callback argument can be serialized 
directly as a `ReportMetricsRequest`. It does not depend on #3732 or #3736.
   
   The format follows the [REST 
specification](https://github.com/apache/iceberg/blob/c44bd8e7c183cf92339939f2aff5ca2aa2a0fd3d/open-api/rest-catalog-open-api.yaml).
 Metric names follow Java's `ScanMetrics` constants, including 
`total-file-size-in-bytes` and `total-delete-file-size-in-bytes`; the spec's 
metrics map allows arbitrary names, while its examples use shorter names. 
Predicates use the spec-supported `term`/`value` representation emitted by 
Java. Unfiltered scans serialize `filter: true`, and empty metadata is omitted.
   
   This covers serialization only. HTTP delivery, catalog registration, and 
predicate sanitization remain follow-ups. Filter literals are serialized as 
supplied, and signed-int64 overflow or non-finite literals return serialization 
errors.
   
   ## Are these changes tested?
   
   Seven serialization tests cover the complete request, every predicate 
operator, primitive literal representations, empty projections/metadata, and 
numeric boundaries. All 2,194 core tests pass (one ignored); formatting and 
Clippy pass. The golden request also validates against the pinned OpenAPI 
`ReportMetricsRequest` schema. Public API snapshots were regenerated for all 
crates; only the three intended `Serialize` implementations were added.
   
   ## AI Disclosure
   
   AI assisted implementation and validation. Review should focus on whether 
REST serialization belongs on the core report types, predicate wire 
compatibility, and the rejection policy for metric overflow and non-finite 
literals. No HTTP delivery or scan integration is exercised by this prototype.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to