github-actions[bot] commented on code in PR #34929:
URL: https://github.com/apache/doris/pull/34929#discussion_r1617333598
##########
be/src/vec/runtime/vorc_transformer.cpp:
##########
@@ -156,83 +167,120 @@ Status VOrcTransformer::open() {
} catch (const std::exception& e) {
return Status::InternalError("failed to create writer: {}", e.what());
}
+ _writer->addUserMetadata("CreatedBy", doris::get_short_version());
return Status::OK();
}
-std::unique_ptr<orc::Type> VOrcTransformer::_build_orc_type(const
TypeDescriptor& type_descriptor) {
- std::pair<Status, std::unique_ptr<orc::Type>> result;
+std::unique_ptr<orc::Type> VOrcTransformer::_build_orc_type(
Review Comment:
warning: function '_build_orc_type' exceeds recommended size/complexity
thresholds [readability-function-size]
```cpp
std::unique_ptr<orc::Type> VOrcTransformer::_build_orc_type(
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/runtime/vorc_transformer.cpp:173:** 109 lines including
whitespace and comments (threshold 80)
```cpp
std::unique_ptr<orc::Type> VOrcTransformer::_build_orc_type(
^
```
</details>
##########
be/src/vec/sink/writer/iceberg/viceberg_partition_writer.cpp:
##########
@@ -0,0 +1,210 @@
+// 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 "viceberg_partition_writer.h"
+
+#include "io/file_factory.h"
+#include "runtime/runtime_state.h"
+#include "vec/columns/column_map.h"
+#include "vec/core/materialize_block.h"
+#include "vec/exec/format/table/iceberg/schema.h"
+#include "vec/runtime/vorc_transformer.h"
+#include "vec/runtime/vparquet_transformer.h"
+
+namespace doris {
+namespace vectorized {
Review Comment:
warning: nested namespaces can be concatenated
[modernize-concat-nested-namespaces]
```suggestion
namespace doris::vectorized {
```
be/src/vec/sink/writer/iceberg/viceberg_partition_writer.cpp:208:
```diff
- } // namespace vectorized
- } // namespace doris
+ } // namespace doris
```
##########
be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:
##########
@@ -0,0 +1,484 @@
+// 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 "viceberg_table_writer.h"
+
+#include "runtime/runtime_state.h"
+#include "vec/core/block.h"
+#include "vec/core/column_with_type_and_name.h"
+#include "vec/core/materialize_block.h"
+#include "vec/exec/format/table/iceberg/partition_spec_parser.h"
+#include "vec/exec/format/table/iceberg/schema_parser.h"
+#include "vec/exprs/vexpr.h"
+#include "vec/exprs/vexpr_context.h"
+#include "vec/sink/writer/iceberg/partition_transformers.h"
+#include "vec/sink/writer/iceberg/viceberg_partition_writer.h"
+#include "vec/sink/writer/vhive_utils.h"
+
+namespace doris {
+namespace vectorized {
+
+VIcebergTableWriter::VIcebergTableWriter(const TDataSink& t_sink,
+ const VExprContextSPtrs&
output_expr_ctxs)
+ : AsyncResultWriter(output_expr_ctxs), _t_sink(t_sink) {
+ DCHECK(_t_sink.__isset.iceberg_table_sink);
+}
+
+Status VIcebergTableWriter::init_properties(ObjectPool* pool) {
+ return Status::OK();
+}
+
+Status VIcebergTableWriter::open(RuntimeState* state, RuntimeProfile* profile)
{
+ _state = state;
+ _profile = profile;
+
+ // add all counter
+ _written_rows_counter = ADD_COUNTER(_profile, "WrittenRows", TUnit::UNIT);
+ _send_data_timer = ADD_TIMER(_profile, "SendDataTime");
+ _partition_writers_dispatch_timer =
+ ADD_CHILD_TIMER(_profile, "PartitionsDispatchTime",
"SendDataTime");
+ _partition_writers_write_timer =
+ ADD_CHILD_TIMER(_profile, "PartitionsWriteTime", "SendDataTime");
+ _partition_writers_count = ADD_COUNTER(_profile, "PartitionsWriteCount",
TUnit::UNIT);
+ _open_timer = ADD_TIMER(_profile, "OpenTime");
+ _close_timer = ADD_TIMER(_profile, "CloseTime");
+ _write_file_counter = ADD_COUNTER(_profile, "WriteFileCount", TUnit::UNIT);
+
+ SCOPED_TIMER(_open_timer);
+ try {
+ _schema =
iceberg::SchemaParser::from_json(_t_sink.iceberg_table_sink.schema_json);
+ std::string partition_spec_json =
+ _t_sink.iceberg_table_sink
+
.partition_specs_json[_t_sink.iceberg_table_sink.partition_spec_id];
+ if (!partition_spec_json.empty()) {
+ _partition_spec = iceberg::PartitionSpecParser::from_json(_schema,
partition_spec_json);
+ _iceberg_partition_columns = _to_iceberg_partition_columns();
+ }
+ } catch (doris::Exception& e) {
+ return e.to_status();
+ }
+
+ std::set<int> partition_idx_set;
+ for (const auto& iceberg_partition_column : _iceberg_partition_columns) {
+ partition_idx_set.insert(iceberg_partition_column.source_idx());
+ }
+
+ for (int i = 0; i < _schema->columns().size(); ++i) {
+ _write_output_vexpr_ctxs.emplace_back(_vec_output_expr_ctxs[i]);
+ }
+
+ return Status::OK();
+}
+
+std::vector<VIcebergTableWriter::IcebergPartitionColumn>
+VIcebergTableWriter::_to_iceberg_partition_columns() {
+ std::vector<IcebergPartitionColumn> partition_columns;
+
+ std::unordered_map<int, int> id_to_column_idx;
+ id_to_column_idx.reserve(_schema->columns().size());
+ for (int i = 0; i < _schema->columns().size(); i++) {
+ id_to_column_idx[_schema->columns()[i].field_id()] = i;
+ }
+ for (const auto& partition_field : _partition_spec->fields()) {
+ int column_idx = id_to_column_idx[partition_field.source_id()];
+ std::unique_ptr<PartitionColumnTransform> partition_column_transform =
+ PartitionColumnTransforms::create(
+ partition_field,
_vec_output_expr_ctxs[column_idx]->root()->type());
+ partition_columns.emplace_back(partition_field,
+
_vec_output_expr_ctxs[column_idx]->root()->type(),
+ column_idx,
std::move(partition_column_transform));
+ }
+ return partition_columns;
+}
+
+Status VIcebergTableWriter::write(vectorized::Block& block) {
Review Comment:
warning: function 'write' exceeds recommended size/complexity thresholds
[readability-function-size]
```cpp
Status VIcebergTableWriter::write(vectorized::Block& block) {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:107:** 139 lines
including whitespace and comments (threshold 80)
```cpp
Status VIcebergTableWriter::write(vectorized::Block& block) {
^
```
</details>
##########
be/src/vec/sink/writer/iceberg/viceberg_table_writer.h:
##########
@@ -0,0 +1,151 @@
+// 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
+
+#include <gen_cpp/DataSinks_types.h>
+
+#include <optional>
+
+#include "util/runtime_profile.h"
+#include "vec/columns/column.h"
+#include "vec/common/string_ref.h"
+#include "vec/core/block.h"
+#include "vec/exec/format/table/iceberg/partition_spec_parser.h"
+#include "vec/exec/format/table/iceberg/schema_parser.h"
+#include "vec/exprs/vexpr_fwd.h"
+#include "vec/sink/writer/async_result_writer.h"
+#include "vec/sink/writer/iceberg/partition_data.h"
+#include "vec/sink/writer/iceberg/partition_transformers.h"
+
+namespace doris {
+
+class ObjectPool;
+class RuntimeState;
+struct TypeDescriptor;
+
+namespace vectorized {
+
+class IColumn;
+class VIcebergPartitionWriter;
+struct ColumnWithTypeAndName;
+
+class VIcebergTableWriter final : public AsyncResultWriter {
+public:
+ VIcebergTableWriter(const TDataSink& t_sink, const VExprContextSPtrs&
output_exprs);
+
+ ~VIcebergTableWriter() = default;
+
+ Status init_properties(ObjectPool* pool);
+
+ Status open(RuntimeState* state, RuntimeProfile* profile) override;
+
+ Status write(vectorized::Block& block) override;
+
+ Status close(Status) override;
+
+private:
+ class IcebergPartitionColumn {
+ public:
+ IcebergPartitionColumn(const iceberg::PartitionField& field,
+ const TypeDescriptor& source_type, int
source_idx,
+ std::unique_ptr<PartitionColumnTransform>
partition_column_transform)
+ : _field(field),
+ _source_type(source_type),
+ _source_idx(source_idx),
+
_partition_column_transform(std::move(partition_column_transform)) {}
+
+ public:
Review Comment:
warning: redundant access specifier has the same accessibility as the
previous access specifier [readability-redundant-access-specifiers]
```suggestion
```
<details>
<summary>Additional context</summary>
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.h:62:** previously
declared here
```cpp
public:
^
```
</details>
##########
be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:
##########
@@ -0,0 +1,484 @@
+// 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 "viceberg_table_writer.h"
+
+#include "runtime/runtime_state.h"
+#include "vec/core/block.h"
+#include "vec/core/column_with_type_and_name.h"
+#include "vec/core/materialize_block.h"
+#include "vec/exec/format/table/iceberg/partition_spec_parser.h"
+#include "vec/exec/format/table/iceberg/schema_parser.h"
+#include "vec/exprs/vexpr.h"
+#include "vec/exprs/vexpr_context.h"
+#include "vec/sink/writer/iceberg/partition_transformers.h"
+#include "vec/sink/writer/iceberg/viceberg_partition_writer.h"
+#include "vec/sink/writer/vhive_utils.h"
+
+namespace doris {
+namespace vectorized {
Review Comment:
warning: nested namespaces can be concatenated
[modernize-concat-nested-namespaces]
```suggestion
namespace doris::vectorized {
```
be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:482:
```diff
- } // namespace vectorized
- } // namespace doris
+ } // namespace doris
```
##########
be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:
##########
@@ -0,0 +1,484 @@
+// 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 "viceberg_table_writer.h"
+
+#include "runtime/runtime_state.h"
+#include "vec/core/block.h"
+#include "vec/core/column_with_type_and_name.h"
+#include "vec/core/materialize_block.h"
+#include "vec/exec/format/table/iceberg/partition_spec_parser.h"
+#include "vec/exec/format/table/iceberg/schema_parser.h"
+#include "vec/exprs/vexpr.h"
+#include "vec/exprs/vexpr_context.h"
+#include "vec/sink/writer/iceberg/partition_transformers.h"
+#include "vec/sink/writer/iceberg/viceberg_partition_writer.h"
+#include "vec/sink/writer/vhive_utils.h"
+
+namespace doris {
+namespace vectorized {
+
+VIcebergTableWriter::VIcebergTableWriter(const TDataSink& t_sink,
+ const VExprContextSPtrs&
output_expr_ctxs)
+ : AsyncResultWriter(output_expr_ctxs), _t_sink(t_sink) {
+ DCHECK(_t_sink.__isset.iceberg_table_sink);
+}
+
+Status VIcebergTableWriter::init_properties(ObjectPool* pool) {
+ return Status::OK();
+}
+
+Status VIcebergTableWriter::open(RuntimeState* state, RuntimeProfile* profile)
{
+ _state = state;
+ _profile = profile;
+
+ // add all counter
+ _written_rows_counter = ADD_COUNTER(_profile, "WrittenRows", TUnit::UNIT);
+ _send_data_timer = ADD_TIMER(_profile, "SendDataTime");
+ _partition_writers_dispatch_timer =
+ ADD_CHILD_TIMER(_profile, "PartitionsDispatchTime",
"SendDataTime");
+ _partition_writers_write_timer =
+ ADD_CHILD_TIMER(_profile, "PartitionsWriteTime", "SendDataTime");
+ _partition_writers_count = ADD_COUNTER(_profile, "PartitionsWriteCount",
TUnit::UNIT);
+ _open_timer = ADD_TIMER(_profile, "OpenTime");
+ _close_timer = ADD_TIMER(_profile, "CloseTime");
+ _write_file_counter = ADD_COUNTER(_profile, "WriteFileCount", TUnit::UNIT);
+
+ SCOPED_TIMER(_open_timer);
+ try {
+ _schema =
iceberg::SchemaParser::from_json(_t_sink.iceberg_table_sink.schema_json);
+ std::string partition_spec_json =
+ _t_sink.iceberg_table_sink
+
.partition_specs_json[_t_sink.iceberg_table_sink.partition_spec_id];
+ if (!partition_spec_json.empty()) {
+ _partition_spec = iceberg::PartitionSpecParser::from_json(_schema,
partition_spec_json);
+ _iceberg_partition_columns = _to_iceberg_partition_columns();
+ }
+ } catch (doris::Exception& e) {
+ return e.to_status();
+ }
+
+ std::set<int> partition_idx_set;
+ for (const auto& iceberg_partition_column : _iceberg_partition_columns) {
+ partition_idx_set.insert(iceberg_partition_column.source_idx());
+ }
+
+ for (int i = 0; i < _schema->columns().size(); ++i) {
+ _write_output_vexpr_ctxs.emplace_back(_vec_output_expr_ctxs[i]);
+ }
+
+ return Status::OK();
+}
+
+std::vector<VIcebergTableWriter::IcebergPartitionColumn>
+VIcebergTableWriter::_to_iceberg_partition_columns() {
+ std::vector<IcebergPartitionColumn> partition_columns;
+
+ std::unordered_map<int, int> id_to_column_idx;
+ id_to_column_idx.reserve(_schema->columns().size());
+ for (int i = 0; i < _schema->columns().size(); i++) {
+ id_to_column_idx[_schema->columns()[i].field_id()] = i;
+ }
+ for (const auto& partition_field : _partition_spec->fields()) {
+ int column_idx = id_to_column_idx[partition_field.source_id()];
+ std::unique_ptr<PartitionColumnTransform> partition_column_transform =
+ PartitionColumnTransforms::create(
+ partition_field,
_vec_output_expr_ctxs[column_idx]->root()->type());
+ partition_columns.emplace_back(partition_field,
+
_vec_output_expr_ctxs[column_idx]->root()->type(),
+ column_idx,
std::move(partition_column_transform));
+ }
+ return partition_columns;
+}
+
+Status VIcebergTableWriter::write(vectorized::Block& block) {
Review Comment:
warning: function 'write' has cognitive complexity of 85 (threshold 50)
[readability-function-cognitive-complexity]
```cpp
Status VIcebergTableWriter::write(vectorized::Block& block) {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:109:** +1,
including nesting penalty of 0, nesting level increased to 1
```cpp
if (block.rows() == 0) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:113:** +1,
including nesting penalty of 0, nesting level increased to 1
```cpp
RETURN_IF_ERROR(vectorized::VExprContext::get_output_block_after_execute_exprs(
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:113:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(vectorized::VExprContext::get_output_block_after_execute_exprs(
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:120:** +1,
including nesting penalty of 0, nesting level increased to 1
```cpp
if (_iceberg_partition_columns.empty()) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:125:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (writer_iter == _partitions_to_writers.end()) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:128:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
} catch (doris::Exception& e) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:132:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:132:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:133:** +1,
nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:134:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (writer_iter->second->written_len() >
config::iceberg_sink_max_file_size) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:145:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
} catch (doris::Exception& e) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:149:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:149:** +5,
including nesting penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:150:** +1,
nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:157:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
RETURN_IF_ERROR(writer->write(output_block));
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:157:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(writer->write(output_block));
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:168:** +1,
including nesting penalty of 0, nesting level increased to 1
```cpp
for (int i = 0; i < output_block.rows(); ++i) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:172:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
} catch (doris::Exception& e) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:179:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
} catch (doris::Exception& e) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:183:** nesting
level increased to 2
```cpp
[&](const std::string& partition_name, int position,
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:189:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:189:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(writer->open(_state, _profile));
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:195:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
} catch (doris::Exception& e) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:202:** +2,
including nesting penalty of 1, nesting level increased to 2
```cpp
if (writer_iter == _partitions_to_writers.end()) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:204:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (_partitions_to_writers.size() + 1 >
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:210:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
RETURN_IF_ERROR(create_and_open_writer(partition_name, i,
nullptr, 0, writer));
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:210:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(create_and_open_writer(partition_name, i,
nullptr, 0, writer));
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:211:** +1,
nesting level increased to 2
```cpp
} else {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:213:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (writer_iter->second->written_len() >
config::iceberg_sink_max_file_size) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:222:** +4,
including nesting penalty of 3, nesting level increased to 4
```cpp
RETURN_IF_ERROR(create_and_open_writer(partition_name,
i, &file_name,
^
```
**be/src/common/status.h:616:** expanded from macro 'RETURN_IF_ERROR'
```cpp
do { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:222:** +5,
including nesting penalty of 4, nesting level increased to 5
```cpp
RETURN_IF_ERROR(create_and_open_writer(partition_name,
i, &file_name,
^
```
**be/src/common/status.h:618:** expanded from macro 'RETURN_IF_ERROR'
```cpp
if (UNLIKELY(!_status_.ok())) { \
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:224:** +1,
nesting level increased to 3
```cpp
} else {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:228:** +3,
including nesting penalty of 2, nesting level increased to 3
```cpp
if (writer_pos_iter == writer_positions.end()) {
^
```
**be/src/vec/sink/writer/iceberg/viceberg_table_writer.cpp:232:** +1,
nesting level increased to 3
```cpp
} else {
^
```
</details>
--
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]