Partially decodes this blob into a [FetchedPart].
(&self, cfg: &FetchConfig)
| 794 | |
| 795 | /// Partially decodes this blob into a [FetchedPart]. |
| 796 | pub(crate) fn parse_internal(&self, cfg: &FetchConfig) -> ShardSourcePart<K, V, T, D> { |
| 797 | let (part, stats) = match &self.buf { |
| 798 | FetchedBlobBuf::Hollow { buf, part } => { |
| 799 | let parsed = decode_batch_part_blob( |
| 800 | cfg, |
| 801 | &self.metrics, |
| 802 | &self.read_metrics, |
| 803 | self.registered_desc.clone(), |
| 804 | part, |
| 805 | buf, |
| 806 | ); |
| 807 | (parsed, part.stats.as_ref()) |
| 808 | } |
| 809 | FetchedBlobBuf::Inline { |
| 810 | desc, |
| 811 | updates, |
| 812 | ts_rewrite, |
| 813 | } => { |
| 814 | let parsed = EncodedPart::from_inline( |
| 815 | cfg, |
| 816 | &self.metrics, |
| 817 | self.read_metrics.clone(), |
| 818 | desc.clone(), |
| 819 | updates, |
| 820 | ts_rewrite.as_ref(), |
| 821 | ); |
| 822 | (parsed, None) |
| 823 | } |
| 824 | }; |
| 825 | let part = FetchedPart::new( |
| 826 | Arc::clone(&self.metrics), |
| 827 | part, |
| 828 | self.migration.clone(), |
| 829 | self.filter.clone(), |
| 830 | self.filter_pushdown_audit, |
| 831 | self.structured_part_audit, |
| 832 | stats, |
| 833 | ); |
| 834 | ShardSourcePart { |
| 835 | part, |
| 836 | fetch_permit: self.fetch_permit.clone(), |
| 837 | } |
| 838 | } |
| 839 | |
| 840 | /// Decodes and returns the pushdown stats for this part, if known. |
| 841 | pub fn stats(&self) -> Option<PartStats> { |
no test coverage detected