From 151fdc224efc8cbbb1099bd4bc7c7182d446c382 Mon Sep 17 00:00:00 2001 From: airborne12 Date: Mon, 16 Jan 2023 08:59:55 +0800 Subject: [PATCH] [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) { | ~~~~~~~~~~~~~~~~~~~^~~ ``` --- .../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) {