11package io .whitefox .api .deltasharing ;
22
33import static io .whitefox .DeltaTestUtils .*;
4- import static io .whitefox .IcebergTestUtils .icebergTableWithHadoopCatalog ;
5- import static io .whitefox .IcebergTestUtils .s3IcebergTableWithAwsGlueCatalog ;
4+ import static io .whitefox .IcebergTestUtils .*;
65
76import io .whitefox .AwsGlueTestConfig ;
87import io .whitefox .S3TestConfig ;
@@ -73,6 +72,78 @@ public static StorageManager createStorageManager() {
7372 0L )));
7473 }
7574
75+ public static final ParquetProtocol localIcebergTable1Protocol =
76+ ParquetProtocol .ofMinReaderVersion (1 );
77+ public static final ParquetProtocol s3IcebergTable1Protocol =
78+ ParquetProtocol .ofMinReaderVersion (1 );
79+ public static final ParquetMetadata localIcebergTable1Metadata = ParquetMetadata .builder ()
80+ .metadata (ParquetMetadata .Metadata .builder ()
81+ .id ("3369848726892806393" )
82+ .name (Optional .of ("metastore.test_db.icebergtable1" ))
83+ .format (new Format ())
84+ .schemaString (
85+ "{\" type\" :\" struct\" ,\" fields\" :[{\" name\" :\" id\" ,\" type\" :\" long\" ,\" nullable\" :false,\" metadata\" :{}}]}" )
86+ .partitionColumns (List .of ())
87+ .version (Optional .of (1L ))
88+ .configuration (Optional .of (Map .of ("write.parquet.compression-codec" , "zstd" )))
89+ .build ())
90+ .build ();
91+
92+ public static final Set <FileObjectWithoutPresignedUrl > localIcebergTableFilesToBeSigned = Set .of (
93+ new FileObjectWithoutPresignedUrl ()
94+ ._file (new FileObjectFileWithoutPresignedUrl ()
95+ .partitionValues (Map .of ())
96+ .size (419L )
97+ .stats (
98+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :3},\" maxValues\" :{\" id\" :3},\" nullCount\" :{\" id\" :0}}" )
99+ .version (1L )
100+ .timestamp (1705667209813L )),
101+ new FileObjectWithoutPresignedUrl ()
102+ ._file (new FileObjectFileWithoutPresignedUrl ()
103+ .partitionValues (Map .of ())
104+ .size (419L )
105+ .stats (
106+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :2},\" maxValues\" :{\" id\" :2},\" nullCount\" :{\" id\" :0}}" )
107+ .version (1L )
108+ .timestamp (1705667209813L )),
109+ new FileObjectWithoutPresignedUrl ()
110+ ._file (new FileObjectFileWithoutPresignedUrl ()
111+ .partitionValues (Map .of ())
112+ .size (419L )
113+ .stats (
114+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :1},\" maxValues\" :{\" id\" :1},\" nullCount\" :{\" id\" :0}}" )
115+ .version (1L )
116+ .timestamp (1705667209813L )),
117+ new FileObjectWithoutPresignedUrl ()
118+ ._file (new FileObjectFileWithoutPresignedUrl ()
119+ .partitionValues (Map .of ())
120+ .size (418L )
121+ .stats (
122+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :0},\" maxValues\" :{\" id\" :0},\" nullCount\" :{\" id\" :0}}" )
123+ .version (1L )
124+ .timestamp (1705667209813L )),
125+ new FileObjectWithoutPresignedUrl ()
126+ ._file (new FileObjectFileWithoutPresignedUrl ()
127+ .partitionValues (Map .of ())
128+ .size (419L )
129+ .stats (
130+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :4},\" maxValues\" :{\" id\" :4},\" nullCount\" :{\" id\" :0}}" )
131+ .version (1L )
132+ .timestamp (1705667209813L )));
133+
134+ public static final ParquetMetadata s3IcebergTable1Metadata = ParquetMetadata .builder ()
135+ .metadata (ParquetMetadata .Metadata .builder ()
136+ .id ("7819530050735196523" )
137+ .name (Optional .of ("metastore.test_glue_db.icebergtable1" ))
138+ .format (new Format ())
139+ .schemaString (
140+ "{\" type\" :\" struct\" ,\" fields\" :[{\" name\" :\" id\" ,\" type\" :\" long\" ,\" nullable\" :false,\" metadata\" :{}}]}" )
141+ .partitionColumns (List .of ())
142+ .version (Optional .of (1L ))
143+ .configuration (Optional .of (Map .of ("write.parquet.compression-codec" , "zstd" )))
144+ .build ())
145+ .build ();
146+
76147 public static final ParquetMetadata deltaTable1Metadata = ParquetMetadata .builder ()
77148 .metadata (ParquetMetadata .Metadata .builder ()
78149 .id ("56d48189-cdbc-44f2-9b0e-2bded4c79ed7" )
@@ -98,6 +169,7 @@ public static StorageManager createStorageManager() {
98169 .configuration (Optional .of (Map .of ()))
99170 .build ())
100171 .build ();
172+
101173 public static final ParquetMetadata deltaTableWithHistory1Metadata = ParquetMetadata .builder ()
102174 .metadata (ParquetMetadata .Metadata .builder ()
103175 .id ("56d48189-cdbc-44f2-9b0e-2bded4c79ed7" )
@@ -110,6 +182,7 @@ public static StorageManager createStorageManager() {
110182 .configuration (Optional .of (Map .of ()))
111183 .build ())
112184 .build ();
185+
113186 public static final ParquetProtocol deltaTable1Protocol = ParquetProtocol .ofMinReaderVersion (1 );
114187
115188 public static final ParquetProtocol s3DeltaTable1Protocol = ParquetProtocol .ofMinReaderVersion (1 );
@@ -196,6 +269,48 @@ public static StorageManager createStorageManager() {
196269 .build ())
197270 .build ());
198271
272+ public static final Set <FileObjectWithoutPresignedUrl > s3IcebergTable1FilesWithoutPresignedUrl =
273+ Set .of (
274+ new FileObjectWithoutPresignedUrl ()
275+ ._file (new FileObjectFileWithoutPresignedUrl ()
276+ .partitionValues (Map .of ())
277+ .size (419L )
278+ .stats (
279+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :4},\" maxValues\" :{\" id\" :4},\" nullCount\" :{\" id\" :0}}" )
280+ .version (1L )
281+ .timestamp (1705948389052L )),
282+ new FileObjectWithoutPresignedUrl ()
283+ ._file (new FileObjectFileWithoutPresignedUrl ()
284+ .partitionValues (Map .of ())
285+ .size (419L )
286+ .stats (
287+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :3},\" maxValues\" :{\" id\" :3},\" nullCount\" :{\" id\" :0}}" )
288+ .version (1L )
289+ .timestamp (1705948389052L )),
290+ new FileObjectWithoutPresignedUrl ()
291+ ._file (new FileObjectFileWithoutPresignedUrl ()
292+ .partitionValues (Map .of ())
293+ .size (419L )
294+ .stats (
295+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :2},\" maxValues\" :{\" id\" :2},\" nullCount\" :{\" id\" :0}}" )
296+ .version (1L )
297+ .timestamp (1705948389052L )),
298+ new FileObjectWithoutPresignedUrl ()
299+ ._file (new FileObjectFileWithoutPresignedUrl ()
300+ .partitionValues (Map .of ())
301+ .size (418L )
302+ .stats (
303+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :0},\" maxValues\" :{\" id\" :0},\" nullCount\" :{\" id\" :0}}" )
304+ .version (1L )
305+ .timestamp (1705948389052L )),
306+ new FileObjectWithoutPresignedUrl ()
307+ ._file (new FileObjectFileWithoutPresignedUrl ()
308+ .partitionValues (Map .of ())
309+ .size (419L )
310+ .stats (
311+ "{\" numRecords\" :1,\" minValues\" :{\" id\" :1},\" maxValues\" :{\" id\" :1},\" nullCount\" :{\" id\" :0}}" )
312+ .version (1L )
313+ .timestamp (1705948389052L )));
199314 public static final Set <FileObjectWithoutPresignedUrl > s3DeltaTable1FilesWithoutPresignedUrl =
200315 Set .of (
201316 new FileObjectWithoutPresignedUrl ()
0 commit comments