fix some typo in comments (#10374)

This commit is contained in:
carlvinhust2012
2022-06-24 07:20:08 +08:00
committed by GitHub
parent b8d2c96842
commit 1541dcd919
4 changed files with 12 additions and 12 deletions

View File

@ -403,16 +403,16 @@ public:
OLAP_ERR_TEST_FILE_ERROR == p_code || OLAP_ERR_ROWBLOCK_READ_INFO_ERROR == p_code;
}
/// @return @c true iff the status indicates Uninitialized.
/// @return @c true if the status indicates Uninitialized.
bool is_uninitialized() const { return code() == TStatusCode::UNINITIALIZED; }
// @return @c true iff the status indicates an Aborted error.
// @return @c true if the status indicates an Aborted error.
bool is_aborted() const { return code() == TStatusCode::ABORTED; }
/// @return @c true iff the status indicates an InvalidArgument error.
/// @return @c true if the status indicates an InvalidArgument error.
bool is_invalid_argument() const { return code() == TStatusCode::INVALID_ARGUMENT; }
// @return @c true iff the status indicates ServiceUnavailable.
// @return @c true if the status indicates ServiceUnavailable.
bool is_service_unavailable() const { return code() == TStatusCode::SERVICE_UNAVAILABLE; }
bool is_data_quality_error() const { return code() == TStatusCode::DATA_QUALITY_ERROR; }

View File

@ -78,7 +78,7 @@ public:
// Return the length (in bytes) of the referenced data
size_t size() const { return _size; }
// Return true iff the length of the referenced data is zero
// Return true if the length of the referenced data is zero
bool empty() const { return _size == 0; }
// Return the ith byte in the referenced data.
@ -125,7 +125,7 @@ public:
uint32_t hash(const char* data, size_t n, uint32_t seed) const;
// Return true iff "x" is a prefix of "*this"
// Return true if "x" is a prefix of "*this"
bool starts_with(const CacheKey& x) const {
return ((_size >= x._size) && (memcmp(_data, x._data, x._size) == 0));
}

View File

@ -73,7 +73,7 @@ public:
// Use hint to insert a key. the hint is from previous Find()
void InsertWithHint(const Key& key, bool is_exist, Hint* hint);
// Returns true iff an entry that compares equal to key is in the list.
// Returns true if an entry that compares equal to key is in the list.
bool Contains(const Key& key) const;
// Like Contains(), but it will return the position info as a hint. We can use this
// position info to insert directly using InsertWithHint().
@ -86,7 +86,7 @@ public:
// The returned iterator is not valid.
explicit Iterator(const SkipList* list);
// Returns true iff the iterator is positioned at a valid node.
// Returns true if the iterator is positioned at a valid node.
bool Valid() const;
// Returns the key at the current position.
@ -105,11 +105,11 @@ public:
void Seek(const Key& target);
// Position at the first entry in list.
// Final state of iterator is Valid() iff list is not empty.
// Final state of iterator is Valid() if list is not empty.
void SeekToFirst();
// Position at the last entry in list.
// Final state of iterator is Valid() iff list is not empty.
// Final state of iterator is Valid() if list is not empty.
void SeekToLast();
private:

View File

@ -391,10 +391,10 @@ public:
virtual bool is_bitmap() const { return false; }
// true iff column has null element
// true if column has null element
virtual bool has_null() const { return false; }
// true iff column has null element [0,size)
// true if column has null element [0,size)
virtual bool has_null(size_t size) const { return false; }
/// It's a special kind of column, that contain single value, but is not a ColumnConst.