Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/unit-test-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-17
sudo apt-get update
sudo apt-get install -y uuid-dev
elif [[ "$RUNNER_OS" == "Windows" ]]; then
choco install llvm --version 17.0.6 --force
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ jobs:
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 100
sudo update-alternatives --set clang-format /usr/bin/clang-format-17
sudo apt-get update
sudo apt-get install -y uuid-dev
elif [[ "$RUNNER_OS" == "Windows" ]]; then
choco install llvm --version 17.0.6 --force
Expand Down
12 changes: 0 additions & 12 deletions cpp/src/common/tsblock/tsblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,6 @@ class TsBlock {
capacity_ += extend_size;
}

// need to call flush_row_count after using colappender
FORCE_INLINE int flush_row_count(uint32_t row_count) {
int errnum = E_OK;
if (row_count_ == 0) {
row_count_ = row_count;
} else if (row_count_ != row_count) {
LOGE("Inconsistent number of rows in two columns");
errnum = E_TSBLOCK_DATA_INCONSISTENCY;
}
return errnum;
}

FORCE_INLINE void fill_trailling_nulls() {
for (uint32_t i = 0; i < get_column_count(); ++i) {
for (uint32_t j = vectors_[i]->get_row_num(); j < row_count_; ++j) {
Expand Down
24 changes: 12 additions & 12 deletions cpp/src/encoding/dictionary_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,54 +37,54 @@ class DictionaryDecoder : public Decoder {

public:
~DictionaryDecoder() override = default;
bool has_remaining(const common::ByteStream &buffer) {
bool has_remaining(const common::ByteStream& buffer) override {
return (!entry_index_.empty() && value_decoder_.has_next_package()) ||
buffer.has_remaining();
}
int read_boolean(bool &ret_value, common::ByteStream &in) override {
int read_boolean(bool& ret_value, common::ByteStream& in) override {
return common::E_TYPE_NOT_MATCH;
}
int read_int32(int32_t &ret_value, common::ByteStream &in) override {
int read_int32(int32_t& ret_value, common::ByteStream& in) override {
return common::E_TYPE_NOT_MATCH;
}
int read_int64(int64_t &ret_value, common::ByteStream &in) override {
int read_int64(int64_t& ret_value, common::ByteStream& in) override {
return common::E_TYPE_NOT_MATCH;
}
int read_float(float &ret_value, common::ByteStream &in) override {
int read_float(float& ret_value, common::ByteStream& in) override {
return common::E_TYPE_NOT_MATCH;
}
int read_double(double &ret_value, common::ByteStream &in) override {
int read_double(double& ret_value, common::ByteStream& in) override {
return common::E_TYPE_NOT_MATCH;
}
int read_String(common::String &ret_value, common::PageArena &pa,
common::ByteStream &in) {
int read_String(common::String& ret_value, common::PageArena& pa,
common::ByteStream& in) override {
auto std_str = read_string(in);
return ret_value.dup_from(std_str, pa);
}

void init() { value_decoder_.init(); }

void reset() {
void reset() override {
value_decoder_.reset();
entry_index_.clear();
}

std::string read_string(common::ByteStream &buffer) {
std::string read_string(common::ByteStream& buffer) {
if (entry_index_.empty()) {
init_map(buffer);
}
int code = value_decoder_.read_int(buffer);
return entry_index_[code];
}

bool has_next(common::ByteStream &buffer) {
bool has_next(common::ByteStream& buffer) {
if (entry_index_.empty()) {
init_map(buffer);
}
return value_decoder_.has_next(buffer);
}

int init_map(common::ByteStream &buffer) {
int init_map(common::ByteStream& buffer) {
int ret = common::E_OK;
int length = 0;
if (RET_FAIL(common::SerializationUtil::read_var_int(length, buffer))) {
Expand Down
Loading
Loading