HeartLinked commented on code in PR #178: URL: https://github.com/apache/iceberg-cpp/pull/178#discussion_r2281170603
########## src/iceberg/inheritable_metadata.h: ########## @@ -0,0 +1,118 @@ +/* + * 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. + */ + +#pragma once + +/// \file iceberg/inheritable_metadata.h +/// Metadata inheritance system for manifest entries. + +#include <cstdint> +#include <memory> +#include <string> + +#include <iceberg/result.h> + +#include "iceberg/iceberg_export.h" +#include "iceberg/manifest_entry.h" +#include "iceberg/manifest_list.h" + +namespace iceberg { + +/// \brief Interface for applying inheritable metadata to manifest entries. +/// +/// When manifest entries have null values for certain fields (snapshot_id, +/// data sequence number, file sequence number), these values should be inherited +/// from the manifest file. This interface provides a way to apply such inheritance rules. +class ICEBERG_EXPORT InheritableMetadata { + public: + virtual ~InheritableMetadata() = default; + + /// \brief Apply inheritable metadata to a manifest entry. + /// \param entry The manifest entry to modify. + /// \return The modified manifest entry with inherited metadata applied. + virtual Result<ManifestEntry> Apply(ManifestEntry entry) = 0; Review Comment: fixed. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
