This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-4.0-preview
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 5c8c7bb9963b7a6494bbe1bca1ec9c83dddd9add
Author: morrySnow <[email protected]>
AuthorDate: Thu Apr 18 20:42:07 2024 +0800

    [fix](compile) fix two compile errors on MacOS (#33834)
    
    1. MacOS use libhdfs3, so we need call different function.
        this compile error intro by PR #33680
    2. size_t is not UInt64 on MacOS
        this compile error intro by PR #33265
---
 be/src/io/fs/hdfs_file_writer.cpp                                 | 4 ++++
 .../aggregate_function_group_array_intersect.h                    | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/be/src/io/fs/hdfs_file_writer.cpp 
b/be/src/io/fs/hdfs_file_writer.cpp
index 7efb4bfb073..46f5a626e42 100644
--- a/be/src/io/fs/hdfs_file_writer.cpp
+++ b/be/src/io/fs/hdfs_file_writer.cpp
@@ -60,7 +60,11 @@ Status HdfsFileWriter::close() {
     _closed = true;
 
     if (_sync_file_data) {
+#ifdef USE_LIBHDFS3
+        int ret = hdfsSync(_hdfs_handler->hdfs_fs, _hdfs_file);
+#else
         int ret = hdfsHSync(_hdfs_handler->hdfs_fs, _hdfs_file);
+#endif
         if (ret != 0) {
             return Status::InternalError("failed to sync hdfs file. fs_name={} 
path={} : {}",
                                          _fs_name, _path.native(), 
hdfs_error());
diff --git 
a/be/src/vec/aggregate_functions/aggregate_function_group_array_intersect.h 
b/be/src/vec/aggregate_functions/aggregate_function_group_array_intersect.h
index 03c1639c45a..5d627782f25 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_group_array_intersect.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_group_array_intersect.h
@@ -256,11 +256,11 @@ public:
         read_pod_binary(is_set_contains_null, buf);
         data.value->change_contains_null_value(is_set_contains_null);
         read_pod_binary(data.init, buf);
-        size_t size;
+        UInt64 size;
         read_var_uint(size, buf);
 
         T element;
-        for (size_t i = 0; i < size; ++i) {
+        for (UInt64 i = 0; i < size; ++i) {
             read_int_binary(element, buf);
             data.value->insert(static_cast<void*>(&element));
         }
@@ -484,11 +484,11 @@ public:
         read_pod_binary(is_set_contains_null, buf);
         data.value->change_contains_null_value(is_set_contains_null);
         read_pod_binary(data.init, buf);
-        size_t size;
+        UInt64 size;
         read_var_uint(size, buf);
 
         StringRef element;
-        for (size_t i = 0; i < size; ++i) {
+        for (UInt64 i = 0; i < size; ++i) {
             element = read_string_binary_into(*arena, buf);
             data.value->insert((void*)element.data, element.size);
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to