ZENOTME commented on PR #135:
URL: https://github.com/apache/iceberg-rust/pull/135#issuecomment-1894877728
> This design is kind of too complicated for me. I still prefer the approach
we used in icelake, and don't overuse too much traits for just saving code.
Actually, this design is to solve a problem I meet in icelake now.🤔 In
icelake, we use an interface like the following:
```
impl FanoutPartitionWriter {
fn metrics(&self) -> PartitionMetrics
}
```
And we have a corresponding monitor writer:
```
struct ParititionMetricsMonitorWriter {
writer: FanoutPartitionWriter
}
```
But after I introduced a new partition writer: `PrecomputePartitionWriter` ,
I found that I couldn't reuse the `ParititionMetricsMonitorWriter` because it's
coupled with `FanoutPartitionWriter`. **But the metrics(state) they expose are
the same**, so I think maybe we need to abstract the interface that expose the
metrics(state).
--
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]