dongxiao1198 commented on code in PR #216: URL: https://github.com/apache/iceberg-cpp/pull/216#discussion_r2422372771
########## src/iceberg/manifest_adapter.cc: ########## @@ -0,0 +1,685 @@ +/* + * 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. + */ + +#include "iceberg/manifest_adapter.h" + +#include <nanoarrow/nanoarrow.h> + +#include "iceberg/arrow/nanoarrow_error_transform_internal.h" +#include "iceberg/manifest_entry.h" +#include "iceberg/manifest_list.h" +#include "iceberg/schema.h" +#include "iceberg/schema_internal.h" +#include "iceberg/util/checked_cast.h" +#include "iceberg/util/macros.h" + +#define NANOARROW_RETURN_IF_FAILED(status) \ + if (status != NANOARROW_OK) [[unlikely]] { \ + return InvalidArrowData("nanoarrow error: {}", status); \ + } Review Comment: there is some different between them. I put them together like: #define ICEBERG_NANOARROW_RETURN_IF_NOT_OK(status) \ if (status != NANOARROW_OK) [[unlikely]] { \ return InvalidArrowData("nanoarrow error: {}", status); \ } #define ICEBERG_NANOARROW_RETURN_IF_NOT_OK_WITH_ERROR(status, error) \ if (status != NANOARROW_OK) [[unlikely]] { \ return InvalidArrowData("nanoarrow error: {} msg:{}", status, error.message); \ } -- 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]
