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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 151fdc224e [Fix](inverted index) fix compilation error for inverted 
index compound directory (#15946)
151fdc224e is described below

commit 151fdc224efc8cbbb1099bd4bc7c7182d446c382
Author: airborne12 <airborn...@gmail.com>
AuthorDate: Mon Jan 16 08:59:55 2023 +0800

    [Fix](inverted index) fix compilation error for inverted index compound 
directory (#15946)
    
    fix compilation error for inverted index compound directory
    
    ```
    be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp:249:32: 
error: comparison of unsigned expression in '< 0' is always false 
[-Werror=type-limits]
      249 |         if (h->_reader->size() < 0) {
          |             ~~~~~~~~~~~~~~~~~~~^~~
    ```
---
 .../rowset/segment_v2/inverted_index_compound_directory.cpp  | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp 
b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
index bb1ba4882f..12bffffb00 100644
--- a/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
+++ b/be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp
@@ -245,14 +245,10 @@ bool DorisCompoundDirectory::FSIndexInput::open(const 
io::FileSystemSPtr& fs, co
     if (h->_reader) {
         //Store the file length
         h->_length = h->_reader->size();
-        // if (handle->_length == -1)
-        if (h->_reader->size() < 0) {
-            error.set(CL_ERR_IO, "fileStat error");
-        } else {
-            h->_fpos = 0;
-            ret = _CLNEW FSIndexInput(h, buffer_size);
-            return true;
-        }
+        h->_fpos = 0;
+        ret = _CLNEW FSIndexInput(h, buffer_size);
+        return true;
+
     } else {
         int err = errno;
         if (err == ENOENT) {


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

Reply via email to