Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][compile] Fix clang compile error #11021

Merged
merged 1 commit into from
Jul 20, 2022
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: 0 additions & 1 deletion be/src/exec/arrow/parquet_row_group_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class RowGroupReader {
private:
int64_t _range_start_offset;
int64_t _range_size;
int64_t _file_size;
std::map<int, std::vector<ExprContext*>> _slot_conjuncts;
std::unordered_set<int> _filter_group;

Expand Down
66 changes: 0 additions & 66 deletions be/src/olap/like_column_predicate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,72 +39,6 @@ void LikeColumnPredicate::evaluate(ColumnBlock* block, uint16_t* sel, uint16_t*
}
}

void LikeColumnPredicate::evaluate(vectorized::IColumn& column, uint16_t* sel,
uint16_t* size) const {
uint16_t new_size = 0;

if (column.is_nullable()) {
auto* nullable_col = vectorized::check_and_get_column<vectorized::ColumnNullable>(column);
auto& null_map_data = nullable_col->get_null_map_column().get_data();
auto& nested_col = nullable_col->get_nested_column();
if (nested_col.is_column_dictionary()) {
auto* nested_col_ptr = vectorized::check_and_get_column<
vectorized::ColumnDictionary<vectorized::Int32>>(nested_col);
auto& data_array = nested_col_ptr->get_data();
for (uint16_t i = 0; i < *size; i++) {
uint16_t idx = sel[i];
sel[new_size] = idx;
if (null_map_data[idx]) {
new_size += _opposite;
continue;
}

StringValue cell_value = nested_col_ptr->get_value(data_array[idx]);
doris_udf::StringVal target;
cell_value.to_string_val(&target);
new_size += _opposite ^ ((_state->function)(_fn_ctx, target, pattern).val);
}
} else {
for (uint16_t i = 0; i < *size; i++) {
uint16_t idx = sel[i];
sel[new_size] = idx;
if (null_map_data[idx]) {
new_size += _opposite;
continue;
}

StringRef cell_value = nested_col.get_data_at(idx);
doris_udf::StringVal target = cell_value.to_string_val();
new_size += _opposite ^ ((_state->function)(_fn_ctx, target, pattern).val);
}
}
} else {
if (column.is_column_dictionary()) {
auto* nested_col_ptr = vectorized::check_and_get_column<
vectorized::ColumnDictionary<vectorized::Int32>>(column);
auto& data_array = nested_col_ptr->get_data();
for (uint16_t i = 0; i < *size; i++) {
uint16_t idx = sel[i];
sel[new_size] = idx;
StringValue cell_value = nested_col_ptr->get_value(data_array[idx]);
doris_udf::StringVal target;
cell_value.to_string_val(&target);
new_size += _opposite ^ ((_state->function)(_fn_ctx, target, pattern).val);
}
} else {
for (uint16_t i = 0; i < *size; i++) {
uint16_t idx = sel[i];
sel[new_size] = idx;
StringRef cell_value = column.get_data_at(idx);
doris_udf::StringVal target = cell_value.to_string_val();
new_size += _opposite ^ ((_state->function)(_fn_ctx, target, pattern).val);
}
}
}

*size = new_size;
}

void LikeColumnPredicate::evaluate_vec(const vectorized::IColumn& column, uint16_t size,
bool* flags) const {
if (column.is_nullable()) {
Expand Down
1 change: 0 additions & 1 deletion be/src/olap/like_column_predicate.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class LikeColumnPredicate : public ColumnPredicate {

PredicateType type() const override { return PredicateType::EQ; }
void evaluate_vec(const vectorized::IColumn& column, uint16_t size, bool* flags) const override;
void evaluate(vectorized::IColumn& column, uint16_t* sel, uint16_t* size) const;

void evaluate(ColumnBlock* block, uint16_t* sel, uint16_t* size) const override;

Expand Down
8 changes: 4 additions & 4 deletions be/src/vec/common/hash_table/string_hash_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,28 +292,28 @@ class StringHashTable : private boost::noncopyable {
break;
}
case 1: {
iterator1.template operator++();
++iterator1;
if (iterator1 == container->m1.end()) {
need_switch_to_next = true;
}
break;
}
case 2: {
iterator2.template operator++();
++iterator2;
if (iterator2 == container->m2.end()) {
need_switch_to_next = true;
}
break;
}
case 3: {
iterator3.template operator++();
++iterator3;
if (iterator3 == container->m3.end()) {
need_switch_to_next = true;
}
break;
}
case 4: {
iterator4.template operator++();
++iterator4;
break;
}
}
Expand Down