Tishj opened a new issue, #12696:
URL: https://github.com/apache/iceberg/issues/12696
### Apache Iceberg version
None
### Query engine
None
### Please describe the bug 🐞
As seen here:
```yaml
ReportMetricsRequest:
anyOf:
- $ref: '#/components/schemas/ScanReport'
- $ref: '#/components/schemas/CommitReport'
required:
- report-type
properties:
report-type:
type: string
```
ReportMetricsRequest is either a `ScanReport` or a `CommitReport`.
To distinguish between the two, there is a `report-type` field.
Presumably wherever this is used, the schema of the ReportMetricsRequest can
be inferred to be one or the other, but it would be great if the constants for
the `report-type` were part of the spec.
Looking at the Java code in the report, this appears to be `scan-report` and
`commit-report`:
```java
private static String fromReportType(ReportType reportType) {
return reportType.name().replaceAll("_",
"-").toLowerCase(Locale.ENGLISH);
}
private static ReportType toReportType(String type) {
return ReportType.fromString(type.replaceAll("-", "_"));
}
```
```java
enum ReportType {
UNKNOWN,
SCAN_REPORT,
COMMIT_REPORT;
```
### Willingness to contribute
- [ ] I can contribute a fix for this bug independently
- [x] I would be willing to contribute a fix for this bug with guidance from
the Iceberg community
- [ ] I cannot contribute a fix for this bug at this time
--
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]