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


##########
be/src/vec/aggregate_functions/aggregate_function_multi_topn.h:
##########
@@ -0,0 +1,267 @@
+// 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 <rapidjson/encodings.h>

Review Comment:
   warning: 'rapidjson/encodings.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <rapidjson/encodings.h>
            ^
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {
+    assert(x != 0);
+
+    if constexpr (sizeof(T) <= sizeof(unsigned int)) {
+        return __builtin_clz(x);
+    } else if constexpr (sizeof(T) <= sizeof(unsigned long int)) /// NOLINT
+    {
+        return __builtin_clzl(x);
+    } else {
+        return __builtin_clzll(x);
+    }
+}
+
+template <typename T>
+inline uint32_t bit_scan_reverse(T x) {
+    return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -

Review Comment:
   warning: use of undeclared identifier 'std' [clang-diagnostic-error]
   ```cpp
       return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -
               ^
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {
+    assert(x != 0);
+
+    if constexpr (sizeof(T) <= sizeof(unsigned int)) {
+        return __builtin_clz(x);
+    } else if constexpr (sizeof(T) <= sizeof(unsigned long int)) /// NOLINT
+    {
+        return __builtin_clzl(x);
+    } else {
+        return __builtin_clzll(x);
+    }
+}
+
+template <typename T>
+inline uint32_t bit_scan_reverse(T x) {
+    return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -

Review Comment:
   warning: expected expression [clang-diagnostic-error]
   ```cpp
       return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -
                              ^
   ```
   



##########
be/src/vec/common/space_saving.h:
##########
@@ -0,0 +1,332 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/SpaceSaving.h.h
+// and modified by Doris
+
+#pragma once
+
+#include <boost/range/adaptor/reversed.hpp>

Review Comment:
   warning: 'boost/range/adaptor/reversed.hpp' file not found 
[clang-diagnostic-error]
   ```cpp
   #include <boost/range/adaptor/reversed.hpp>
            ^
   ```
   



##########
be/test/common/space_saving_test.cpp:
##########
@@ -0,0 +1,195 @@
+// 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 "vec/common/space_saving.h"

Review Comment:
   warning: 'vec/common/space_saving.h' file not found [clang-diagnostic-error]
   ```cpp
   #include "vec/common/space_saving.h"
            ^
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {

Review Comment:
   warning: unknown type name 'uint32_t' [clang-diagnostic-error]
   ```cpp
   inline uint32_t get_leading_zero_bits_unsafe(T x) {
          ^
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {
+    assert(x != 0);
+
+    if constexpr (sizeof(T) <= sizeof(unsigned int)) {
+        return __builtin_clz(x);
+    } else if constexpr (sizeof(T) <= sizeof(unsigned long int)) /// NOLINT
+    {
+        return __builtin_clzl(x);
+    } else {
+        return __builtin_clzll(x);
+    }
+}
+
+template <typename T>
+inline uint32_t bit_scan_reverse(T x) {
+    return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -

Review Comment:
   warning: use of undeclared identifier 'size_t'; did you mean 'sizeof'? 
[clang-diagnostic-error]
   
   ```suggestion
       return (std::max<sizeof>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {
+    assert(x != 0);
+
+    if constexpr (sizeof(T) <= sizeof(unsigned int)) {
+        return __builtin_clz(x);
+    } else if constexpr (sizeof(T) <= sizeof(unsigned long int)) /// NOLINT
+    {
+        return __builtin_clzl(x);
+    } else {
+        return __builtin_clzll(x);
+    }
+}
+
+template <typename T>
+inline uint32_t bit_scan_reverse(T x) {

Review Comment:
   warning: unknown type name 'uint32_t' [clang-diagnostic-error]
   ```cpp
   inline uint32_t bit_scan_reverse(T x) {
          ^
   ```
   



##########
be/src/vec/common/bit_helpers.h:
##########
@@ -0,0 +1,45 @@
+// 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.
+// This file is copied from
+// 
https://github.com/ClickHouse/ClickHouse/blob/master/src/Common/BitHelpers.h.h
+// and modified by Doris
+
+#pragma once
+
+namespace doris::vectorized {
+
+template <typename T>
+inline uint32_t get_leading_zero_bits_unsafe(T x) {
+    assert(x != 0);
+
+    if constexpr (sizeof(T) <= sizeof(unsigned int)) {
+        return __builtin_clz(x);
+    } else if constexpr (sizeof(T) <= sizeof(unsigned long int)) /// NOLINT
+    {
+        return __builtin_clzl(x);
+    } else {
+        return __builtin_clzll(x);
+    }
+}
+
+template <typename T>
+inline uint32_t bit_scan_reverse(T x) {
+    return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -

Review Comment:
   warning: left operand of comma operator has no effect 
[clang-diagnostic-unused-value]
   ```cpp
       return (std::max<size_t>(sizeof(T), sizeof(unsigned int))) * 8 - 1 -
                                ^
   ```
   



##########
be/test/util/algo_util_test.cpp:
##########
@@ -0,0 +1,46 @@
+// 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 <gtest/gtest-message.h>

Review Comment:
   warning: 'gtest/gtest-message.h' file not found [clang-diagnostic-error]
   ```cpp
   #include <gtest/gtest-message.h>
            ^
   ```
   



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