RussellSpitzer commented on code in PR #3256: URL: https://github.com/apache/polaris/pull/3256#discussion_r2673402956
########## storage/files/impl/src/testFixtures/java/org/apache/polaris/storage/files/impl/IcebergFixtures.java: ########## @@ -0,0 +1,194 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.polaris.storage.files.impl; + +import static java.lang.String.format; +import static java.nio.charset.StandardCharsets.UTF_8; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.ByteArrayOutputStream; +import java.util.Map; +import org.apache.avro.generic.GenericData; +import org.apache.iceberg.IcebergBridge; +import org.apache.iceberg.PartitionSpec; +import org.apache.iceberg.Schema; +import org.apache.iceberg.SchemaParser; +import org.apache.iceberg.TableMetadata; +import org.apache.iceberg.TableMetadataParser; +import org.apache.iceberg.types.Types; +import org.projectnessie.catalog.formats.iceberg.IcebergSpec; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergDataContent; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergDataFile; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergFileFormat; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestContent; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestEntry; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestEntryStatus; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestFile; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestFileWriter; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestFileWriterSpec; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestListWriter; +import org.projectnessie.catalog.formats.iceberg.manifest.IcebergManifestListWriterSpec; +import org.projectnessie.catalog.formats.iceberg.meta.IcebergPartitionSpec; +import org.projectnessie.catalog.formats.iceberg.meta.IcebergSchema; Review Comment: I'd have to agree we probably shouldn't use Nessie as a dependency here, if we want to re-use the fixture we should probably just copy the code into this project. I'm also onboard with @adam-christian-software 's implementation above. Long term probably makes sense for the Iceberg project to provide something along these lines that downstream projects can use. Another minor note is this only uses V2 Iceberg tables, we probably should be double checking against V3 as well. -- 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]
