github-actions[bot] commented on code in PR #45311:
URL: https://github.com/apache/doris/pull/45311#discussion_r1880132671


##########
be/src/vec/sink/writer/vhive_config.h:
##########
@@ -0,0 +1,37 @@
+// 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
+
+namespace doris {
+namespace vectorized {
+
+class HiveCatalogConfig {
+public:
+    // ORC Writer configurations
+    static constexpr char ORC_WRITER_LEGACY_HIVE_COMPATIBLE[] =
+            "hive.orc.writer.legacy_hive_compatible";
+
+private:
+    HiveCatalogConfig() = delete;
+    ~HiveCatalogConfig() = delete;
+    HiveCatalogConfig(const HiveCatalogConfig&) = delete;

Review Comment:
   warning: deleted member function should be public 
[modernize-use-equals-delete]
   ```cpp
       HiveCatalogConfig(const HiveCatalogConfig&) = delete;
       ^
   ```
   



##########
be/src/vec/sink/writer/vhive_config.h:
##########
@@ -0,0 +1,37 @@
+// 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
+
+namespace doris {
+namespace vectorized {
+
+class HiveCatalogConfig {
+public:
+    // ORC Writer configurations
+    static constexpr char ORC_WRITER_LEGACY_HIVE_COMPATIBLE[] =
+            "hive.orc.writer.legacy_hive_compatible";
+
+private:
+    HiveCatalogConfig() = delete;
+    ~HiveCatalogConfig() = delete;
+    HiveCatalogConfig(const HiveCatalogConfig&) = delete;
+    HiveCatalogConfig& operator=(const HiveCatalogConfig&) = delete;

Review Comment:
   warning: deleted member function should be public 
[modernize-use-equals-delete]
   ```cpp
       HiveCatalogConfig& operator=(const HiveCatalogConfig&) = delete;
                          ^
   ```
   



##########
be/src/vec/sink/writer/vhive_config.h:
##########
@@ -0,0 +1,37 @@
+// 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
+
+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/vhive_config.h:35:
   ```diff
   - } // namespace vectorized
   - } // namespace doris
   + } // namespace doris
   ```
   



##########
be/src/vec/sink/writer/vhive_config.h:
##########
@@ -0,0 +1,37 @@
+// 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
+
+namespace doris {
+namespace vectorized {
+
+class HiveCatalogConfig {
+public:
+    // ORC Writer configurations
+    static constexpr char ORC_WRITER_LEGACY_HIVE_COMPATIBLE[] =
+            "hive.orc.writer.legacy_hive_compatible";
+
+private:
+    HiveCatalogConfig() = delete;
+    ~HiveCatalogConfig() = delete;

Review Comment:
   warning: deleted member function should be public 
[modernize-use-equals-delete]
   ```cpp
       ~HiveCatalogConfig() = delete;
       ^
   ```
   



##########
be/src/vec/sink/writer/vhive_partition_writer.cpp:
##########
@@ -107,9 +108,17 @@ Status VHivePartitionWriter::open(RuntimeState* state, 
RuntimeProfile* profile)
         return _file_format_transformer->open();
     }
     case TFileFormatType::FORMAT_ORC: {
+        bool legacy_hive_compatible = false;
+        auto it = 
_hadoop_conf.find(HiveCatalogConfig::ORC_WRITER_LEGACY_HIVE_COMPATIBLE);
+        if (it != _hadoop_conf.end()) {
+            const std::string& value = it->second;
+            std::string lower_value = value;
+            std::transform(lower_value.begin(), lower_value.end(), 
lower_value.begin(), ::tolower);
+            legacy_hive_compatible = (lower_value == "false" ? false : true);

Review Comment:
   warning: redundant boolean literal in ternary expression result 
[readability-simplify-boolean-expr]
   
   ```suggestion
               legacy_hive_compatible = (static_cast<bool>(lower_value != 
"false"));
   ```
   



##########
be/src/vec/sink/writer/vhive_config.h:
##########
@@ -0,0 +1,37 @@
+// 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
+
+namespace doris {
+namespace vectorized {
+
+class HiveCatalogConfig {
+public:
+    // ORC Writer configurations
+    static constexpr char ORC_WRITER_LEGACY_HIVE_COMPATIBLE[] =
+            "hive.orc.writer.legacy_hive_compatible";
+
+private:
+    HiveCatalogConfig() = delete;

Review Comment:
   warning: deleted member function should be public 
[modernize-use-equals-delete]
   ```cpp
       HiveCatalogConfig() = delete;
       ^
   ```
   



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to