@@ -56,7 +56,9 @@ use uuid::Uuid;
5656
5757use crate :: critical:: CriticalReaderId ;
5858use crate :: error:: InvalidUsage ;
59- use crate :: internal:: encoding:: { LazyInlineBatchPart , LazyPartStats , LazyProto , parse_id} ;
59+ use crate :: internal:: encoding:: {
60+ LazyInlineBatchPart , LazyPartStats , LazyProto , MetadataMap , parse_id,
61+ } ;
6062use crate :: internal:: gc:: GcReq ;
6163use crate :: internal:: machine:: retry_external;
6264use crate :: internal:: paths:: { BlobKey , PartId , PartialBatchKey , PartialRollupKey , WriterKey } ;
@@ -825,6 +827,8 @@ pub struct RunMeta {
825827pub struct HollowBatchPart < T > {
826828 /// Pointer usable to retrieve the updates.
827829 pub key : PartialBatchKey ,
830+ /// Miscellaneous metadata.
831+ pub meta : MetadataMap ,
828832 /// The encoded size of this part.
829833 pub encoded_size_bytes : usize ,
830834 /// A lower bound on the keys in the part. (By default, this the minimum
@@ -1213,6 +1217,7 @@ impl<T: Ord> Ord for HollowBatchPart<T> {
12131217 // are added.
12141218 let HollowBatchPart {
12151219 key : self_key,
1220+ meta : self_meta,
12161221 encoded_size_bytes : self_encoded_size_bytes,
12171222 key_lower : self_key_lower,
12181223 structured_key_lower : self_structured_key_lower,
@@ -1225,6 +1230,7 @@ impl<T: Ord> Ord for HollowBatchPart<T> {
12251230 } = self ;
12261231 let HollowBatchPart {
12271232 key : other_key,
1233+ meta : other_meta,
12281234 encoded_size_bytes : other_encoded_size_bytes,
12291235 key_lower : other_key_lower,
12301236 structured_key_lower : other_structured_key_lower,
@@ -1237,6 +1243,7 @@ impl<T: Ord> Ord for HollowBatchPart<T> {
12371243 } = other;
12381244 (
12391245 self_key,
1246+ self_meta,
12401247 self_encoded_size_bytes,
12411248 self_key_lower,
12421249 self_structured_key_lower,
@@ -1249,6 +1256,7 @@ impl<T: Ord> Ord for HollowBatchPart<T> {
12491256 )
12501257 . cmp ( & (
12511258 other_key,
1259+ other_meta,
12521260 other_encoded_size_bytes,
12531261 other_key_lower,
12541262 other_structured_key_lower,
@@ -2998,6 +3006,7 @@ pub(crate) mod tests {
29983006 ) | {
29993007 HollowBatchPart {
30003008 key,
3009+ meta : Default :: default ( ) ,
30013010 encoded_size_bytes,
30023011 key_lower,
30033012 structured_key_lower : None ,
@@ -3171,6 +3180,7 @@ pub(crate) mod tests {
31713180 . map ( |x| {
31723181 RunPart :: Single ( BatchPart :: Hollow ( HollowBatchPart {
31733182 key : PartialBatchKey ( ( * x) . to_owned ( ) ) ,
3183+ meta : Default :: default ( ) ,
31743184 encoded_size_bytes : 0 ,
31753185 key_lower : vec ! [ ] ,
31763186 structured_key_lower : None ,
0 commit comments