obelix74 commented on code in PR #4115:
URL: https://github.com/apache/polaris/pull/4115#discussion_r3251982085


##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/metrics/PolarisMetricsManager.java:
##########
@@ -75,4 +80,34 @@ default void writeCommitMetrics(
       @Nonnull PolarisCallContext callCtx, @Nonnull CommitMetricsRecord 
record) {
     callCtx.getMetaStore().writeCommitReport(record);
   }
+
+  default Page<ScanMetricsRecord> listScanMetrics(

Review Comment:
   Agreed — an interface whose every method is `default` is odd; it's 
essentially a mixin rather than a real contract. The shape here mirrors 
`PolarisEventManager` (which has the same all-default pattern), and the intent 
is that `PolarisMetaStoreManager` picks up these methods by extending the 
interface. Once #4397 decomposes `BasePersistence` into disjoint SPIs, the 
layering will be cleaner and we can revisit whether `PolarisMetricsManager` 
itself is still needed or can be collapsed into the `MetricsPersistence` SPI 
directly.



##########
polaris-core/src/main/java/org/apache/polaris/core/persistence/metrics/PolarisMetricsManager.java:
##########
@@ -75,4 +80,34 @@ default void writeCommitMetrics(
       @Nonnull PolarisCallContext callCtx, @Nonnull CommitMetricsRecord 
record) {
     callCtx.getMetaStore().writeCommitReport(record);
   }
+
+  default Page<ScanMetricsRecord> listScanMetrics(

Review Comment:
   Correct — they're interim. Once we consolidate to a single `METRICS_REPORTS` 
table with a `metric_type` discriminator column, these two methods can collapse 
into a single polymorphic `listMetrics(metricType, ...)` (or we keep them typed 
and have both delegate to the same underlying query). My plan is to do that 
collapse in the same PR as the schema consolidation so the API shape and the 
persistence shape change together, rather than leaving a transitional period 
where the API has two methods but the DB has one table.



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

Reply via email to