[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) {
      |             ~~~~~~~~~~~~~~~~~~~^~~
```
This commit is contained in:
airborne12
2023-01-16 08:59:55 +08:00
committed by GitHub
parent 067b33bca7
commit 151fdc224e

View File

@ -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) {