Skip to content

Core: Use unknown report type for forward-compatibility - #7145

Merged
rdblue merged 1 commit into
apache:masterfrom
nastra:unknown-metrics-report
Mar 20, 2023
Merged

rdblue merged 1 commit into
apache:masterfrom
nastra:unknown-metrics-report

Conversation

@nastra

@nastra nastra commented Mar 20, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions github-actions Bot added the core label Mar 20, 2023
@nastra nastra closed this Mar 20, 2023
@nastra nastra reopened this Mar 20, 2023
Preconditions.checkArgument(
null != reportType, "Unsupported report type: %s", report.getClass().getName());

return ImmutableReportMetricsRequest.builder().reportType(reportType).report(report).build();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't fallback to returning ReportMetricsRequest unknown() because should prefer the report that was passed in to this method in L57

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this for cases where an unknown metrics report is passed by a user rather than by Iceberg? I guess that makes sense, but I wouldn't expect it to happen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't expect it to happen either, but I think it's more correct to pass-through whatever the report was in the first place (rather than defaulting to an unknown impl).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants