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


##########
be/src/vec/exec/format/table/iceberg/partition_spec.h:
##########
@@ -0,0 +1,97 @@
+// 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 <atomic>
+#include <memory>
+#include <string>
+#include <vector>
+
+namespace doris {
+namespace iceberg {
+
+class StructLike;
+class Schema;
+
+class PartitionField {
+public:
+    PartitionField(int sourceId, int fieldId, std::string name, std::string 
transform);
+
+    int source_id() const { return _source_id; }
+
+    int field_id() const { return _field_id; }
+
+    const std::string& name() const { return _name; }
+
+    const std::string& transform() const { return _transform; }
+
+private:
+    int _source_id;
+    int _field_id;
+    std::string _name;
+    std::string _transform;
+};
+
+class PartitionSpec {
+public:
+    class Builder {
+    public:
+        Builder(std::shared_ptr<Schema> schema);
+
+        ~Builder() = default;
+
+        Builder& with_spec_id(int new_spec_id);
+
+        Builder& add(int sourceId, int fieldId, std::string name, std::string 
transform);
+
+        Builder& add(int sourceId, std::string name, std::string transform);
+
+        std::unique_ptr<PartitionSpec> build();
+
+    private:
+        int next_field_id() { return ++_last_assigned_field_id; }
+
+    private:

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/exec/format/table/iceberg/partition_spec.h:65:** previously 
declared here
   ```cpp
       private:
       ^
   ```
   
   </details>
   



##########
be/src/vec/exec/format/table/iceberg/unbound_partition_spec.h:
##########
@@ -0,0 +1,75 @@
+// 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 <string>
+#include <vector>
+
+#include "partition_spec.h"
+#include "vec/exec/format/table/iceberg/partition_spec.h"
+
+namespace doris {
+namespace iceberg {

Review Comment:
   warning: nested namespaces can be concatenated 
[modernize-concat-nested-namespaces]
   
   ```suggestion
   namespace doris::iceberg {
   ```
   
   be/src/vec/exec/format/table/iceberg/unbound_partition_spec.h:73:
   ```diff
   - } // namespace iceberg
   - } // namespace doris
   + } // namespace doris
   ```
   



##########
be/src/vec/exec/format/table/iceberg/partition_spec.h:
##########
@@ -0,0 +1,97 @@
+// 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 <atomic>
+#include <memory>
+#include <string>
+#include <vector>
+
+namespace doris {
+namespace iceberg {

Review Comment:
   warning: nested namespaces can be concatenated 
[modernize-concat-nested-namespaces]
   
   ```suggestion
   namespace doris::iceberg {
   ```
   
   be/src/vec/exec/format/table/iceberg/partition_spec.h:95:
   ```diff
   - } // namespace iceberg
   - } // namespace doris
   + } // namespace doris
   ```
   



-- 
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