@@ -19,6 +19,7 @@ use chrono::Utc;
1919use databend_common_expression as ce;
2020use databend_common_meta_app:: schema as mt;
2121use databend_common_meta_app:: schema:: SnapshotRef ;
22+ use databend_common_meta_app:: schema:: SnapshotRefType ;
2223use fastrace:: func_name;
2324use maplit:: btreemap;
2425use maplit:: btreeset;
@@ -41,10 +42,10 @@ fn test_decode_v161_snapshot_ref() -> anyhow::Result<()> {
4142 10 , 7 , 160 , 6 , 161 , 1 , 168 , 6 , 24 , 64 , 0 , 162 , 1 , 23 , 50 , 48 , 49 , 52 , 45 , 49 , 49 , 45 , 50 ,
4243 56 , 32 , 49 , 50 , 58 , 48 , 48 , 58 , 48 , 57 , 32 , 85 , 84 , 67 , 170 , 1 , 23 , 50 , 48 , 49 , 52 , 45 , 49 ,
4344 49 , 45 , 50 , 57 , 32 , 49 , 50 , 58 , 48 , 48 , 58 , 49 , 48 , 32 , 85 , 84 , 67 , 186 , 1 , 7 , 160 , 6 , 161 ,
44- 1 , 168 , 6 , 24 , 226 , 1 , 1 , 1 , 170 , 2 , 52 , 10 , 8 , 98 , 114 , 97 , 110 , 99 , 104 , 95 , 49 , 18 , 40 ,
45+ 1 , 168 , 6 , 24 , 226 , 1 , 1 , 1 , 170 , 2 , 47 , 10 , 8 , 98 , 114 , 97 , 110 , 99 , 104 , 95 , 49 , 18 , 35 ,
4546 10 , 23 , 50 , 48 , 49 , 52 , 45 , 49 , 49 , 45 , 50 , 56 , 32 , 49 , 50 , 58 , 48 , 48 , 58 , 48 , 57 , 32 , 85 ,
46- 84 , 67 , 18 , 6 , 10 , 1 , 97 , 18 , 1 , 98 , 160 , 6 , 161 , 1 , 168 , 6 , 24 , 170 , 2 , 19 , 10 , 5 , 116 ,
47- 97 , 103 , 95 , 49 , 18 , 10 , 26 , 1 , 99 , 160 , 6 , 161 , 1 , 168 , 6 , 24 , 160 , 6 , 161 , 1 , 168 , 6 , 24 ,
47+ 84 , 67 , 26 , 1 , 97 , 160 , 6 , 161 , 1 , 168 , 6 , 24 , 170 , 2 , 21 , 10 , 5 , 116 , 97 , 103 , 95 , 49 , 18 ,
48+ 12 , 16 , 1 , 26 , 1 , 99 , 160 , 6 , 161 , 1 , 168 , 6 , 24 , 160 , 6 , 161 , 1 , 168 , 6 , 24 ,
4849 ] ;
4950
5051 let want = || mt:: TableMeta {
@@ -73,14 +74,13 @@ fn test_decode_v161_snapshot_ref() -> anyhow::Result<()> {
7374 refs : btreemap ! {
7475 "branch_1" . to_string( ) => SnapshotRef {
7576 expire_at: Some ( Utc . with_ymd_and_hms( 2014 , 11 , 28 , 12 , 0 , 9 ) . unwrap( ) ) ,
76- info: mt:: SnapshotRefInfo :: Branch {
77- head: "a" . to_string( ) ,
78- anchor: "b" . to_string( ) ,
79- } ,
77+ typ: SnapshotRefType :: Branch ,
78+ loc: "a" . to_string( ) ,
8079 } ,
8180 "tag_1" . to_string( ) => SnapshotRef {
8281 expire_at: None ,
83- info: mt:: SnapshotRefInfo :: Tag ( "c" . to_string( ) ) ,
82+ typ: SnapshotRefType :: Tag ,
83+ loc: "c" . to_string( ) ,
8484 }
8585 } ,
8686 } ;
0 commit comments