github-actions[bot] commented on code in PR #35311:
URL: https://github.com/apache/doris/pull/35311#discussion_r1611672917
##########
be/src/vec/sink/writer/vhive_partition_writer.cpp:
##########
@@ -51,6 +51,19 @@ VHivePartitionWriter::VHivePartitionWriter(
_hadoop_conf(hadoop_conf) {}
Status VHivePartitionWriter::open(RuntimeState* state, RuntimeProfile*
profile) {
+ bool expected = false;
+ if (_opened.compare_exchange_strong(expected, true)) {
+ Status status = _open_internal(state, profile);
+ if (!status.ok()) {
+ _opened.store(false);
+ }
+ return status;
+ } else {
+ return Status::InternalError("VHivePartitionWriter is already
opened.");
+ }
+}
+
+Status VHivePartitionWriter::_open_internal(RuntimeState* state,
RuntimeProfile* profile) {
Review Comment:
warning: function '_open_internal' exceeds recommended size/complexity
thresholds [readability-function-size]
```cpp
Status VHivePartitionWriter::_open_internal(RuntimeState* state,
RuntimeProfile* profile) {
^
```
<details>
<summary>Additional context</summary>
**be/src/vec/sink/writer/vhive_partition_writer.cpp:65:** 94 lines including
whitespace and comments (threshold 80)
```cpp
Status VHivePartitionWriter::_open_internal(RuntimeState* state,
RuntimeProfile* profile) {
^
```
</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]