dongxiao1198 commented on code in PR #176: URL: https://github.com/apache/iceberg-cpp/pull/176#discussion_r2281494022
########## src/iceberg/v1_metadata.h: ########## @@ -0,0 +1,53 @@ +/* + * 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/v1_metadata.h + +#include "iceberg/manifest_entry.h" +#include "iceberg/manifest_list.h" + +namespace iceberg { + +/// \brief v1 metadata wrapper. +/// +/// Wrapper for v1 manifest list and manifest entry. +class V1MetaData { + public: + /// \brief v1 manifest file wrapper. + struct ManifestFileWrapper : public ManifestFile { + ManifestFileWrapper() = default; + + ManifestFile wrap(ManifestFile file, int64_t first_row_id) { return *this; } Review Comment: That's a problem, java implement just overwrite all getters and keep a reference of manifest, wrapp ths file by getter in wrapper. But in cpp, our manifest is a public struct. It seems impossible to avoid this copy without refactor out manifest and list into class and make all members private with a public virtual getter. -- 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]
