Skip to content

Commit c860fe2

Browse files
author
xiao.dong
committed
fix comments
1 parent 478a6ea commit c860fe2

24 files changed

+454
-340
lines changed

src/iceberg/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,20 @@
1818
set(ICEBERG_INCLUDES "$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/src>"
1919
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>")
2020
set(ICEBERG_SOURCES
21+
arrow_c_data_guard_internal.cc
2122
catalog/in_memory_catalog.cc
2223
expression/expression.cc
2324
expression/literal.cc
2425
file_reader.cc
2526
file_writer.cc
2627
inheritable_metadata.cc
2728
json_internal.cc
29+
manifest_adapter.cc
2830
manifest_entry.cc
2931
manifest_list.cc
32+
manifest_reader.cc
33+
manifest_reader_internal.cc
34+
manifest_writer.cc
3035
metadata_columns.cc
3136
name_mapping.cc
3237
partition_field.cc
@@ -45,17 +50,12 @@ set(ICEBERG_SOURCES
4550
transform.cc
4651
transform_function.cc
4752
type.cc
48-
manifest_reader.cc
49-
manifest_reader_internal.cc
50-
manifest_writer.cc
51-
manifest_adapter.cc
52-
v1_metadata.cc
53-
v2_metadata.cc
54-
v3_metadata.cc
55-
arrow_c_data_guard_internal.cc
53+
util/gzip_internal.cc
5654
util/murmurhash3_internal.cc
5755
util/timepoint.cc
58-
util/gzip_internal.cc)
56+
v1_metadata.cc
57+
v2_metadata.cc
58+
v3_metadata.cc)
5959

6060
set(ICEBERG_STATIC_BUILD_INTERFACE_LIBS)
6161
set(ICEBERG_SHARED_BUILD_INTERFACE_LIBS)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
#pragma once
21+
22+
#define ICEBERG_NANOARROW_RETURN_IF_NOT_OK(status, error) \
23+
if (status != NANOARROW_OK) [[unlikely]] { \
24+
return InvalidArrowData("Nanoarrow error msg: {}", error.message); \
25+
}

src/iceberg/avro/avro_writer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class AvroWriter::Impl {
7575
return {};
7676
}
7777

78-
Status Write(ArrowArray data) {
78+
Status Write(ArrowArray& data) {
7979
ICEBERG_ARROW_ASSIGN_OR_RETURN(auto result,
8080
::arrow::ImportArray(&data, &arrow_schema_));
8181

@@ -119,7 +119,7 @@ class AvroWriter::Impl {
119119

120120
AvroWriter::~AvroWriter() = default;
121121

122-
Status AvroWriter::Write(ArrowArray data) { return impl_->Write(data); }
122+
Status AvroWriter::Write(ArrowArray& data) { return impl_->Write(data); }
123123

124124
Status AvroWriter::Open(const WriterOptions& options) {
125125
impl_ = std::make_unique<Impl>();

src/iceberg/avro/avro_writer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ICEBERG_BUNDLE_EXPORT AvroWriter : public Writer {
3535

3636
Status Close() final;
3737

38-
Status Write(ArrowArray data) final;
38+
Status Write(ArrowArray& data) final;
3939

4040
std::optional<Metrics> metrics() final;
4141

src/iceberg/file_writer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ICEBERG_EXPORT Writer {
6565
/// \brief Write arrow data to the file.
6666
///
6767
/// \return Status of write results.
68-
virtual Status Write(ArrowArray data) = 0;
68+
virtual Status Write(ArrowArray& data) = 0;
6969

7070
/// \brief Get the file statistics.
7171
/// Only valid after the file is closed.

0 commit comments

Comments
 (0)