obelix74 commented on code in PR #4115:
URL: https://github.com/apache/polaris/pull/4115#discussion_r3251983918
##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/metrics/MetricsPersistence.java:
##########
@@ -73,4 +77,56 @@ default void writeScanReport(@Nonnull ScanMetricsRecord
record) {
default void writeCommitReport(@Nonnull CommitMetricsRecord record) {
// No-op by default - backends that don't support metrics silently ignore
}
+
+ /**
+ * Lists scan metrics reports for a given table, ordered by timestamp
descending.
+ *
+ * <p>Default implementation returns an empty page. Override in
implementations that support
+ * metrics reads.
+ *
+ * @param catalogId the internal catalog ID
+ * @param tableId the internal table entity ID
+ * @param snapshotId optional filter by snapshot ID
+ * @param principalName optional filter by principal name
+ * @param timestampFrom optional inclusive lower bound on timestamp (epoch
ms)
+ * @param timestampTo optional exclusive upper bound on timestamp (epoch ms)
+ * @param pageToken pagination token
+ * @return a page of scan metrics records
+ */
+ default Page<ScanMetricsRecord> listScanReports(
Review Comment:
Agreed, let's sync. The key open items are: (1) rebase on #4397 once it
lands so metrics persistence is its own SPI; (2) collapse to a single
`METRICS_REPORTS` table in a follow-up PR; (3) decide whether
`listScanMetrics`/`listCommitMetrics` collapse into one polymorphic method at
the same time as the schema change. Happy to set up a quick call or thread to
align on the sequencing.
--
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]